Skip to content

Commit

Permalink
fix: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cakekindel committed Jan 29, 2023
1 parent 5a84560 commit 8418930
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
4 changes: 2 additions & 2 deletions toad-msg/src/msg/id.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#[allow(unused_imports)]
use crate::Token;
use toad_common::Cursor;

use super::MessageParseError;
use crate::from_bytes::TryConsumeBytes;
#[allow(unused_imports)]
use crate::Token;

/// # Message ID
///
Expand Down
5 changes: 3 additions & 2 deletions toad-msg/src/msg/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#[allow(unused_imports)]
use crate::TryIntoBytes;
use toad_common::{AppendCopy, Array, Cursor, GetSize};
use toad_macros::rfc_7252_doc;

#[allow(unused_imports)]
use crate::TryIntoBytes;

/// Message Code
pub mod code;

Expand Down
18 changes: 12 additions & 6 deletions toad-msg/src/msg/opt/known.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@ pub mod no_repeat {

opt!(rfc7252("5.10.1") HOST = 3);
opt!(rfc7252("5.10.8.2") IF_NONE_MATCH = 5);
opt!(#[doc = "See [`HOST`]"] PORT = 7);
opt!(#[doc = "See [`HOST`]"] PATH = 11);
opt!(#[doc = "See [`HOST`]"]
PORT = 7);
opt!(#[doc = "See [`HOST`]"]
PATH = 11);
opt!(rfc7252("5.10.3") CONTENT_FORMAT = 12);
opt!(rfc7252("5.10.5") MAX_AGE = 14);
opt!(rfc7252("5.10.4") ACCEPT = 17);
opt!(rfc7252("5.10.2") PROXY_URI = 35);
opt!(#[doc = "See [`PROXY_URI`]"] PROXY_SCHEME = 39);
opt!(#[doc = "See [`PROXY_URI`]"]
PROXY_SCHEME = 39);
opt!(rfc7252("5.10.9") SIZE1 = 60);
}

Expand All @@ -38,14 +41,17 @@ pub mod repeat {

opt!(rfc7252("5.10.8.1") IF_MATCH = 1);
opt!(rfc7252("5.10.7") LOCATION_PATH = 8);
opt!(#[doc = "See [`super::no_repeat::HOST`]"] QUERY = 11);
opt!(#[doc = "See [`LOCATION_PATH`]"] LOCATION_QUERY = 20);
opt!(#[doc = "See [`super::no_repeat::HOST`]"]
QUERY = 11);
opt!(#[doc = "See [`LOCATION_PATH`]"]
LOCATION_QUERY = 20);
opt!(#[doc = concat!(
toad_macros::rfc_7252_doc!("5.10.6"),
"\n<details><summary>ETag as a Request Option</summary>\n\n",
toad_macros::rfc_7252_doc!("5.10.6.2"),
"\n</details><details><summary>ETag as a Response Option</summary>\n\n",
toad_macros::rfc_7252_doc!("5.10.6.1"),
"</details>"
)] ETAG = 4);
)]
ETAG = 4);
}
10 changes: 5 additions & 5 deletions toad-msg/src/msg/opt/known/content_format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ impl<'a> From<&'a ContentFormat> for u16 {
}

impl<'a> IntoIterator for &'a ContentFormat {
type Item = u8;
type Item = u8;

type IntoIter = <[u8; 2] as IntoIterator>::IntoIter;
type IntoIter = <[u8; 2] as IntoIterator>::IntoIter;

fn into_iter(self) -> Self::IntoIter {
self.bytes().into_iter()
}
fn into_iter(self) -> Self::IntoIter {
self.bytes().into_iter()
}
}

0 comments on commit 8418930

Please sign in to comment.