diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-02-12 01:48:21 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-02-12 01:48:21 +0100 |
| commit | 7d3878466cfecde17f5e707d65503435394f7ae5 (patch) | |
| tree | dbf205bd4c2d7c71e95f51c11d7fe13e403d61b4 /embassy-net | |
| parent | a7d1d02be022b6dd1e5170780b509057f150ca9d (diff) | |
reexport smoltcp error/result
Diffstat (limited to 'embassy-net')
| -rw-r--r-- | embassy-net/src/device.rs | 2 | ||||
| -rw-r--r-- | embassy-net/src/lib.rs | 1 | ||||
| -rw-r--r-- | embassy-net/src/tcp_socket.rs | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/embassy-net/src/device.rs b/embassy-net/src/device.rs index 95a62e792..ea23635c7 100644 --- a/embassy-net/src/device.rs +++ b/embassy-net/src/device.rs | |||
| @@ -2,10 +2,10 @@ use core::task::{Poll, Waker}; | |||
| 2 | use smoltcp::phy::Device as SmolDevice; | 2 | use smoltcp::phy::Device as SmolDevice; |
| 3 | use smoltcp::phy::DeviceCapabilities; | 3 | use smoltcp::phy::DeviceCapabilities; |
| 4 | use smoltcp::time::Instant as SmolInstant; | 4 | use smoltcp::time::Instant as SmolInstant; |
| 5 | use smoltcp::Result; | ||
| 6 | 5 | ||
| 7 | use crate::fmt::*; | 6 | use crate::fmt::*; |
| 8 | use crate::{Packet, PacketBox, PacketBuf}; | 7 | use crate::{Packet, PacketBox, PacketBuf}; |
| 8 | use crate::Result; | ||
| 9 | 9 | ||
| 10 | #[derive(PartialEq, Eq, Clone, Copy)] | 10 | #[derive(PartialEq, Eq, Clone, Copy)] |
| 11 | pub enum LinkState { | 11 | pub enum LinkState { |
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index fe1d529d8..de2f2ea74 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs | |||
| @@ -28,3 +28,4 @@ pub use smoltcp::time::Instant as SmolInstant; | |||
| 28 | pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr}; | 28 | pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr}; |
| 29 | pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>; | 29 | pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>; |
| 30 | pub type SocketSet = smoltcp::socket::SocketSet<'static>; | 30 | pub type SocketSet = smoltcp::socket::SocketSet<'static>; |
| 31 | pub use smoltcp::{Error, Result}; \ No newline at end of file | ||
diff --git a/embassy-net/src/tcp_socket.rs b/embassy-net/src/tcp_socket.rs index eab8189de..84f096525 100644 --- a/embassy-net/src/tcp_socket.rs +++ b/embassy-net/src/tcp_socket.rs | |||
| @@ -9,10 +9,10 @@ use smoltcp::socket::TcpSocket as SyncTcpSocket; | |||
| 9 | use smoltcp::socket::{TcpSocketBuffer, TcpState}; | 9 | use smoltcp::socket::{TcpSocketBuffer, TcpState}; |
| 10 | use smoltcp::time::Duration; | 10 | use smoltcp::time::Duration; |
| 11 | use smoltcp::wire::IpEndpoint; | 11 | use smoltcp::wire::IpEndpoint; |
| 12 | use smoltcp::{Error, Result}; | ||
| 13 | 12 | ||
| 14 | use super::stack::Stack; | 13 | use super::stack::Stack; |
| 15 | use crate::fmt::*; | 14 | use crate::fmt::*; |
| 15 | use crate::{Error, Result}; | ||
| 16 | 16 | ||
| 17 | pub struct TcpSocket<'a> { | 17 | pub struct TcpSocket<'a> { |
| 18 | handle: SocketHandle, | 18 | handle: SocketHandle, |
