net: update smoltcp

This commit is contained in:
Dario Nieuwenhuis
2021-11-26 04:12:14 +01:00
parent 539c007b44
commit c257893da9
10 changed files with 55 additions and 73 deletions

View File

@ -67,7 +67,7 @@ async fn main_task(spawner: Spawner) {
socket.set_timeout(Some(embassy_net::SmolDuration::from_secs(10)));
let remote_endpoint = (Ipv4Address::new(192, 168, 69, 74), 8000);
let remote_endpoint = (Ipv4Address::new(192, 168, 69, 100), 8000);
info!("connecting to {:?}...", remote_endpoint);
let r = socket.connect(remote_endpoint).await;
if let Err(e) = r {

View File

@ -9,7 +9,7 @@ pub struct SerialPort {
}
impl SerialPort {
pub fn new<'a, P: ?Sized + nix::NixPath>(
pub fn new<P: ?Sized + nix::NixPath>(
path: &P,
baudrate: termios::BaudRate,
) -> io::Result<Self> {

View File

@ -170,8 +170,7 @@ impl crate::Device for TunTapDevice {
Err(e) if e.kind() == io::ErrorKind::WouldBlock => {
let ready = if let Some(w) = self.waker.as_ref() {
let mut cx = Context::from_waker(w);
let ready = self.device.poll_readable(&mut cx).is_ready();
ready
self.device.poll_readable(&mut cx).is_ready()
} else {
false
};