Skip to content

Commit

Permalink
chore: fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Aug 10, 2024
1 parent b262dcb commit 3e0f98a
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/containers/partials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ impl IntoIterator for Batch {
impl Batch {
pub fn close_method_set(&self) -> CloseMethodSet {
let mut methods = CloseMethodSet::from(self.main.first.method);
self.main.second.as_ref().map(|info| methods |= info.method);
if let Some(info) = &self.main.second {
methods |= info.method;
}
self.blanks.iter().for_each(|i| methods |= i.first.method);
self.blanks
.iter()
Expand All @@ -230,15 +232,14 @@ impl Batch {

pub fn set_priority(&mut self, priority: u8) {
self.main.first.transition.nonce = priority;
self.main
.second
.as_mut()
.map(|info| info.transition.nonce = priority);
if let Some(info) = &mut self.main.second {
info.transition.nonce = priority;
}
for info in &mut self.blanks {
info.first.transition.nonce = priority;
info.second
.as_mut()
.map(|info| info.transition.nonce = priority);
if let Some(info) = &mut info.second {
info.transition.nonce = priority;
}
}
}
}
Expand Down

0 comments on commit 3e0f98a

Please sign in to comment.