summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-27 10:49:37 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2021-09-30 08:31:07 +0300
commit6f21483fda6c2e46c056977e4bdb0b9fe940d03a (patch)
tree6039a9de4a3796e2f85a06498ec26ce8598dcc8e
parente39ee6b130d30a9a095b37bd453ff09566f05023 (diff)
Drop pointless @_ match pattern bindings
In a match arm, instead of binding the matched value to the name "_", just don't bind. Its shorter and easier to understand Found by clippy lint redundant_patter: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern
-rw-r--r--net/src/wkd.rs2
-rw-r--r--sq/src/commands/inspect.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/src/wkd.rs b/net/src/wkd.rs
index 6662567a..7d3df2d9 100644
--- a/net/src/wkd.rs
+++ b/net/src/wkd.rs
@@ -400,7 +400,7 @@ pub fn insert<P, S, V>(base_path: P, domain: S, variant: V,
.open(well_known.expect("at least one address").join("policy"))
{
Err(ref e) if e.kind() == std::io::ErrorKind::AlreadyExists => (),
- r @ _ => drop(r?),
+ r => drop(r?),
}
Ok(())
diff --git a/sq/src/commands/inspect.rs b/sq/src/commands/inspect.rs
index e6e86d01..7d136ab0 100644
--- a/sq/src/commands/inspect.rs
+++ b/sq/src/commands/inspect.rs
@@ -347,7 +347,7 @@ fn inspect_signatures(output: &mut dyn io::Write,
for sig in sigs {
match sig.typ() {
Binary | Text => (),
- signature_type @ _ =>
+ signature_type =>
writeln!(output, " Kind: {}", signature_type)?,
}