Skip to content

Commit da385d7

Browse files
committed
clippy: trivial stuff
I split out the previous lint fix because touching boolean expressions always makes me nervous. These ones are mechanical changes that do not make me nervous.
1 parent 555270f commit da385d7

3 files changed

Lines changed: 6 additions & 8 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ copy_iterator = "warn"
9191
default_trait_access = "warn"
9292
doc_link_with_quotes = "warn"
9393
doc_markdown = "warn"
94-
empty_enum = "warn"
94+
empty_enums = "warn"
9595
enum_glob_use = "warn"
9696
expl_impl_clone_on_copy = "warn"
9797
explicit_deref_methods = "warn"
@@ -173,7 +173,7 @@ struct_field_names = "warn"
173173
too_many_lines = "allow" # FIXME 14 triggers for this lint; probably most should be fixed
174174
transmute_ptr_to_ptr = "warn"
175175
trivially_copy_pass_by_ref = "warn"
176-
unchecked_duration_subtraction = "warn"
176+
unchecked_time_subtraction = "warn"
177177
unicode_not_nfc = "warn"
178178
unnecessary_box_returns = "warn"
179179
unnecessary_join = "warn"

src/pset/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,11 @@ impl PartiallySignedTransaction {
360360

361361
self.global.merge(other.global)?;
362362

363-
for (self_input, other_input) in self.inputs.iter_mut().zip(other.inputs.into_iter()) {
363+
for (self_input, other_input) in self.inputs.iter_mut().zip(other.inputs) {
364364
self_input.merge(other_input)?;
365365
}
366366

367-
for (self_output, other_output) in self.outputs.iter_mut().zip(other.outputs.into_iter()) {
367+
for (self_output, other_output) in self.outputs.iter_mut().zip(other.outputs) {
368368
self_output.merge(other_output)?;
369369
}
370370

src/pset/serialize.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,8 @@ impl Deserialize for KeySource {
186186

187187
let mut d = &bytes[4..];
188188
while !d.is_empty() {
189-
match u32::consensus_decode(&mut d) {
190-
Ok(index) => dpath.push(index.into()),
191-
Err(e) => return Err(e),
192-
}
189+
let index = u32::consensus_decode(&mut d)?;
190+
dpath.push(index.into());
193191
}
194192

195193
Ok((fprint, dpath.into()))

0 commit comments

Comments
 (0)