From 7d3878466cfecde17f5e707d65503435394f7ae5 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Fri, 12 Feb 2021 01:48:21 +0100 Subject: [PATCH] reexport smoltcp error/result --- embassy-net/src/device.rs | 2 +- embassy-net/src/lib.rs | 1 + 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}; use smoltcp::phy::Device as SmolDevice; use smoltcp::phy::DeviceCapabilities; use smoltcp::time::Instant as SmolInstant; -use smoltcp::Result; use crate::fmt::*; use crate::{Packet, PacketBox, PacketBuf}; +use crate::Result; #[derive(PartialEq, Eq, Clone, Copy)] 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; pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr}; pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>; pub type SocketSet = smoltcp::socket::SocketSet<'static>; +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; use smoltcp::socket::{TcpSocketBuffer, TcpState}; use smoltcp::time::Duration; use smoltcp::wire::IpEndpoint; -use smoltcp::{Error, Result}; use super::stack::Stack; use crate::fmt::*; +use crate::{Error, Result}; pub struct TcpSocket<'a> { handle: SocketHandle,