Skip to content

Commit

Permalink
chore: remove embedded-nal dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzofelletti committed Oct 28, 2024
1 parent 64d7beb commit 10ddf2e
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 30 deletions.
23 changes: 0 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ regex = { version = "1.10", default-features = false }
lazy_static = { version = "1.5.0", default-features = false, features = [
"spin_no_std",
] }
embedded-nal = "0.8.0"
bitflags = { version = "2.6.0", default-features = false }
2 changes: 1 addition & 1 deletion src/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use alloc::{
string::{String, ToString},
vec as a_vec,
};
use core::net::{IpAddr, Ipv4Addr, SocketAddr};
use dns_protocol::{Flags, Question, ResourceRecord};
use embedded_io::{Read, Write};
use embedded_nal::{IpAddr, Ipv4Addr, SocketAddr};
use psp::sys::in_addr;

use crate::socket::state::Connected;
Expand Down
4 changes: 2 additions & 2 deletions src/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#![allow(clippy::module_name_repetitions)]

use embedded_nal::{Ipv4Addr, SocketAddrV4};
use core::net::{Ipv4Addr, SocketAddrV4};
use psp::sys::{in_addr, sockaddr};

use super::netc;
Expand Down Expand Up @@ -78,4 +78,4 @@ impl ToSocketAddr for sockaddr {
}

// re-exports
pub type SocketAddr = embedded_nal::SocketAddr;
pub type SocketAddr = core::net::SocketAddr;
2 changes: 1 addition & 1 deletion src/socket/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use alloc::vec::Vec;
use embedded_io::{ErrorType, Read, Write};

use embedded_nal::SocketAddr;
use core::net::SocketAddr;
use psp::sys;

use core::ffi::c_void;
Expand Down
2 changes: 1 addition & 1 deletion src/socket/udp.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![allow(clippy::module_name_repetitions)]

use alloc::vec::Vec;
use core::net::{IpAddr, Ipv4Addr, SocketAddr};
use embedded_io::{ErrorType, Read, Write};
use embedded_nal::{IpAddr, Ipv4Addr, SocketAddr};
use psp::sys::{self, sockaddr, socklen_t};

use core::ffi::c_void;
Expand Down
2 changes: 1 addition & 1 deletion src/traits/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use core::fmt::Debug;

use alloc::string::String;

use embedded_nal::SocketAddr;
use core::net::SocketAddr;
use psp::sys::in_addr;

/// Trait for resolving hostnames
Expand Down

0 comments on commit 10ddf2e

Please sign in to comment.