reexport smoltcp error/result

This commit is contained in:
Dario Nieuwenhuis 2021-02-12 01:48:21 +01:00
parent a7d1d02be0
commit 7d3878466c
3 changed files with 3 additions and 2 deletions

View file

@ -2,10 +2,10 @@ use core::task::{Poll, Waker};
use smoltcp::phy::Device as SmolDevice; use smoltcp::phy::Device as SmolDevice;
use smoltcp::phy::DeviceCapabilities; use smoltcp::phy::DeviceCapabilities;
use smoltcp::time::Instant as SmolInstant; use smoltcp::time::Instant as SmolInstant;
use smoltcp::Result;
use crate::fmt::*; use crate::fmt::*;
use crate::{Packet, PacketBox, PacketBuf}; use crate::{Packet, PacketBox, PacketBuf};
use crate::Result;
#[derive(PartialEq, Eq, Clone, Copy)] #[derive(PartialEq, Eq, Clone, Copy)]
pub enum LinkState { pub enum LinkState {

View file

@ -28,3 +28,4 @@ pub use smoltcp::time::Instant as SmolInstant;
pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr}; pub use smoltcp::wire::{IpAddress, IpCidr, Ipv4Address, Ipv4Cidr};
pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>; pub type Interface = smoltcp::iface::Interface<'static, device::DeviceAdapter>;
pub type SocketSet = smoltcp::socket::SocketSet<'static>; pub type SocketSet = smoltcp::socket::SocketSet<'static>;
pub use smoltcp::{Error, Result};

View file

@ -9,10 +9,10 @@ use smoltcp::socket::TcpSocket as SyncTcpSocket;
use smoltcp::socket::{TcpSocketBuffer, TcpState}; use smoltcp::socket::{TcpSocketBuffer, TcpState};
use smoltcp::time::Duration; use smoltcp::time::Duration;
use smoltcp::wire::IpEndpoint; use smoltcp::wire::IpEndpoint;
use smoltcp::{Error, Result};
use super::stack::Stack; use super::stack::Stack;
use crate::fmt::*; use crate::fmt::*;
use crate::{Error, Result};
pub struct TcpSocket<'a> { pub struct TcpSocket<'a> {
handle: SocketHandle, handle: SocketHandle,