diff --git a/toad-msg/src/msg/id.rs b/toad-msg/src/msg/id.rs index 5fe8d6fe..17f60854 100644 --- a/toad-msg/src/msg/id.rs +++ b/toad-msg/src/msg/id.rs @@ -1,3 +1,5 @@ +#[allow(unused_imports)] +use crate::Token; use toad_common::Cursor; use super::MessageParseError; diff --git a/toad-msg/src/msg/mod.rs b/toad-msg/src/msg/mod.rs index 1c259c94..4396e04e 100644 --- a/toad-msg/src/msg/mod.rs +++ b/toad-msg/src/msg/mod.rs @@ -1,3 +1,5 @@ +#[allow(unused_imports)] +use crate::TryIntoBytes; use toad_common::{AppendCopy, Array, Cursor, GetSize}; use toad_macros::rfc_7252_doc; @@ -249,7 +251,7 @@ impl + AppendCopy, Options: OptionMap> /// Get the value(s) of an option by number /// - /// This just invokes [`Map::get`] on [`Message.opts`]. + /// This just invokes [`toad_common::Map::get`] on [`Message.opts`]. pub fn get(&self, n: OptNumber) -> Option<&Options::OptValues> { self.opts.get(&n) } diff --git a/toad-msg/src/msg/opt/known.rs b/toad-msg/src/msg/opt/known.rs index cfc7ffa3..d6a89257 100644 --- a/toad-msg/src/msg/opt/known.rs +++ b/toad-msg/src/msg/opt/known.rs @@ -1,4 +1,4 @@ -/// Content-Format +/// Content-Format values pub mod content_format; macro_rules! opt { diff --git a/toad-msg/src/msg/opt/mod.rs b/toad-msg/src/msg/opt/mod.rs index f0366a94..2f22c9a8 100644 --- a/toad-msg/src/msg/opt/mod.rs +++ b/toad-msg/src/msg/opt/mod.rs @@ -18,7 +18,7 @@ pub use parse_error::*; pub mod known; pub use known::*; -/// Implementor of [`IterOpts`] +/// An iterator over owned [`Opt`]s #[derive(Debug, Clone)] pub struct OptIter where M: OptionMap @@ -29,7 +29,7 @@ pub struct OptIter __p: PhantomData, } -/// Implementor of [`IterOptRefs`] +/// An iterator over [`OptRef`]s #[derive(Debug, Clone)] pub struct OptRefIter<'a, M, I> where M: OptionMap @@ -369,14 +369,14 @@ pub enum WhenOptionUnsupportedByProxy { #[doc = rfc_7252_doc!("5.4.2")] #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] pub enum WhenOptionChanges { - /// If this option is [safe to forward](`ProxySafe::ForwardWhenUnknown`), + /// If this option is [safe to forward](`WhenOptionUnsupportedByProxy::Forward`), /// but unknown to a proxy, it should be included in the proxy's /// cache key for this message. /// /// Corresponds to the option being not "NoCacheKey" /// in strict CoAP terms ResponseChanges, - /// If this option is [safe to forward](`ProxySafe::ForwardWhenUnknown`), + /// If this option is [safe to forward](`WhenOptionUnsupportedByProxy::Forward`), /// but unknown to a proxy, it should not be included in the proxy's /// cache key for this message, and different values for this option /// should yield the cached response. diff --git a/toad-msg/src/msg/parse_error.rs b/toad-msg/src/msg/parse_error.rs index 9ca06d7c..2955ed3a 100644 --- a/toad-msg/src/msg/parse_error.rs +++ b/toad-msg/src/msg/parse_error.rs @@ -1,3 +1,6 @@ +#[allow(unused_imports)] +use crate::Type; + /// Errors encounterable while parsing a message from bytes #[derive(Copy, Clone, Debug, PartialEq, PartialOrd, Eq, Ord)] pub enum MessageParseError {