Skip to content

Commit

Permalink
Try fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo committed Jul 21, 2024
1 parent 964afa9 commit 82555d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/message/attrs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,22 +215,22 @@ impl<'de> Deserialize<'de> for Attrs {
if !(attr_flags & AttrFlags::Size).is_empty() {
attrs.size = Some(next!(seq, "attr_size"));
} else {
next!(seq, "attr_size");
let () = next!(seq, "attr_size");
}
if !(attr_flags & AttrFlags::Owner).is_empty() {
attrs.owner = Some(next!(seq, "attr_owner"));
} else {
next!(seq, "attr_owner");
let () = next!(seq, "attr_owner");
}
if !(attr_flags & AttrFlags::Perms).is_empty() {
attrs.perms = Some(next!(seq, "attr_perms"));
} else {
next!(seq, "attr_perms");
let () = next!(seq, "attr_perms");
}
if !(attr_flags & AttrFlags::Time).is_empty() {
attrs.time = Some(next!(seq, "attr_time"));
} else {
next!(seq, "attr_time");
let () = next!(seq, "attr_time");
}

Ok(attrs)
Expand Down
2 changes: 1 addition & 1 deletion src/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ macro_rules! messages {
let no_value = || ::serde::de::Error::custom("no value found");
let code = seq.next_element::<u8>()?.ok_or_else(no_value)?;
let (id, message) = if code == Init::DISCRIMINANT || code == Version::DISCRIMINANT {
seq.next_element()?.ok_or_else(no_value)?;
let () = seq.next_element()?.ok_or_else(no_value)?;
if code == Init::DISCRIMINANT {
(0, Message::Init(seq.next_element()?.ok_or_else(no_value)?))
} else {
Expand Down

0 comments on commit 82555d7

Please sign in to comment.