diff --git a/src/riot-rs-coap/src/lib.rs b/src/riot-rs-coap/src/lib.rs index 784313132..1216fe519 100644 --- a/src/riot-rs-coap/src/lib.rs +++ b/src/riot-rs-coap/src/lib.rs @@ -11,9 +11,8 @@ // Moving work from https://github.com/embassy-rs/embassy/pull/2519 in here for the time being mod udp_nal; -use coap_handler_implementations::{HandlerBuilder, ReportingHandlerBuilder}; +use coap_handler_implementations::ReportingHandlerBuilder; use coapcore::seccontext; -use critical_section::Mutex; use embassy_net::udp::{PacketMetadata, UdpSocket}; use riot_rs_debug::log::*; use static_cell::StaticCell; @@ -46,7 +45,6 @@ pub async fn coap_run( &mut tx_meta, &mut tx_buffer, ); - use embedded_nal_async::UnconnectedUdp; info!("Starting up CoAP server"); diff --git a/src/riot-rs-coap/src/udp_nal/mod.rs b/src/riot-rs-coap/src/udp_nal/mod.rs index 6c9478314..9b5db7a47 100644 --- a/src/riot-rs-coap/src/udp_nal/mod.rs +++ b/src/riot-rs-coap/src/udp_nal/mod.rs @@ -25,6 +25,10 @@ mod util; pub use util::Error; use util::{is_unspec_ip, sockaddr_nal2smol, sockaddr_smol2nal}; +#[expect( + dead_code, + reason = "pub item is being prepared for embedded-nal-async where it will be reachable publicly" +)] pub struct ConnectedUdp<'a> { remote: IpEndpoint, // The local port is stored in the socket, as it gets bound. This value is populated lazily: @@ -50,6 +54,10 @@ impl<'a> ConnectedUdp<'a> { /// /// The `socket` must be open (in the sense of smoltcp's `.is_open()`) -- unbound and /// unconnected. + #[expect( + dead_code, + reason = "pub item is being prepared for embedded-nal-async where it will be reachable publicly" + )] pub async fn connect_from( mut socket: udp::UdpSocket<'a>, local: nal::SocketAddr, @@ -74,6 +82,10 @@ impl<'a> ConnectedUdp<'a> { /// /// The `socket` must be open (in the sense of smoltcp's `.is_open()`) -- unbound and /// unconnected. + #[expect( + dead_code, + reason = "pub item is being prepared for embedded-nal-async where it will be reachable publicly" + )] pub async fn connect(socket: udp::UdpSocket<'a>, /*, ... */) -> Result { // This is really just a copy of the provided `embedded_nal::udp::UdpStack::connect` method todo!("use {:p}", &socket) diff --git a/src/riot-rs-coap/src/udp_nal/util.rs b/src/riot-rs-coap/src/udp_nal/util.rs index 5d04060d8..bccb27555 100644 --- a/src/riot-rs-coap/src/udp_nal/util.rs +++ b/src/riot-rs-coap/src/udp_nal/util.rs @@ -64,6 +64,7 @@ pub enum Error { BindError(udp::BindError), /// Error stemming from failure to represent the given address family for lack of enabled /// embassy-net features + #[expect(dead_code, reason = "feature selection currently disabled")] AddressFamilyUnavailable, }