diff options
Diffstat (limited to 'examples/std')
| -rw-r--r-- | examples/std/Cargo.toml | 18 | ||||
| -rw-r--r-- | examples/std/src/serial_port.rs | 9 |
2 files changed, 12 insertions, 15 deletions
diff --git a/examples/std/Cargo.toml b/examples/std/Cargo.toml index 34b8ebb67..3ba495e59 100644 --- a/examples/std/Cargo.toml +++ b/examples/std/Cargo.toml | |||
| @@ -9,12 +9,12 @@ embassy = { version = "0.1.0", path = "../../embassy", features = ["log", "std", | |||
| 9 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features=["std", "log", "medium-ethernet", "tcp", "dhcpv4"] } | 9 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features=["std", "log", "medium-ethernet", "tcp", "dhcpv4"] } |
| 10 | smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp", rev="e4241510337e095b9d21136c5f58b2eaa1b78479", default-features = false } | 10 | smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp", rev="e4241510337e095b9d21136c5f58b2eaa1b78479", default-features = false } |
| 11 | 11 | ||
| 12 | async-io = "1.3.1" | 12 | async-io = "1.6.0" |
| 13 | env_logger = "0.8.2" | 13 | env_logger = "0.9.0" |
| 14 | futures = { version = "0.3.8", default-features = false, features = ["async-await"] } | 14 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } |
| 15 | log = "0.4.11" | 15 | log = "0.4.14" |
| 16 | nix = "0.21.0" | 16 | nix = "0.22.1" |
| 17 | libc = "0.2.81" | 17 | libc = "0.2.101" |
| 18 | clap = { version = "3.0.0-beta.2", features = ["derive"] } | 18 | clap = { version = "3.0.0-beta.4", features = ["derive"] } |
| 19 | rand_core = { version = "0.6.0", features = ["std"] } | 19 | rand_core = { version = "0.6.3", features = ["std"] } |
| 20 | heapless = { version = "0.7.1", default-features = false } | 20 | heapless = { version = "0.7.5", default-features = false } |
diff --git a/examples/std/src/serial_port.rs b/examples/std/src/serial_port.rs index 7ac1b1edb..aadaeb81d 100644 --- a/examples/std/src/serial_port.rs +++ b/examples/std/src/serial_port.rs | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | use nix::errno::Errno; | ||
| 1 | use nix::fcntl::OFlag; | 2 | use nix::fcntl::OFlag; |
| 2 | use nix::sys::termios; | 3 | use nix::sys::termios; |
| 3 | use nix::Error; | ||
| 4 | use std::io; | 4 | use std::io; |
| 5 | use std::os::unix::io::{AsRawFd, RawFd}; | 5 | use std::os::unix::io::{AsRawFd, RawFd}; |
| 6 | 6 | ||
| @@ -63,9 +63,6 @@ impl io::Write for SerialPort { | |||
| 63 | } | 63 | } |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | fn to_io_error(e: Error) -> io::Error { | 66 | fn to_io_error(e: Errno) -> io::Error { |
| 67 | match e { | 67 | e.into() |
| 68 | Error::Sys(errno) => errno.into(), | ||
| 69 | e => io::Error::new(io::ErrorKind::InvalidInput, e), | ||
| 70 | } | ||
| 71 | } | 68 | } |
