about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduardo Broto <ebroto@tutanota.com>2020-05-21 14:47:13 +0200
committerEduardo Broto <ebroto@tutanota.com>2020-05-21 14:47:13 +0200
commit1a04686fc0d2752de8731c833ab67bfae6136720 (patch)
tree631a56ee49f8f502d8121954f917cfe6fe7ebecd
parent7ff71199df911b462800cf6bda7ac32879ba7eb1 (diff)
downloadrust-1a04686fc0d2752de8731c833ab67bfae6136720.tar.gz
rust-1a04686fc0d2752de8731c833ab67bfae6136720.zip
Avoid triggering match_wildcard_for_single_variants
-rw-r--r--clippy_dev/src/new_lint.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_dev/src/new_lint.rs b/clippy_dev/src/new_lint.rs
index 80713ab569f..08a2e0c0918 100644
--- a/clippy_dev/src/new_lint.rs
+++ b/clippy_dev/src/new_lint.rs
@@ -18,11 +18,11 @@ trait Context {
 impl<T> Context for io::Result<T> {
     fn context<C: AsRef<str>>(self, text: C) -> Self {
         match self {
+            Ok(t) => Ok(t),
             Err(e) => {
                 let message = format!("{}: {}", text.as_ref(), e);
                 Err(io::Error::new(ErrorKind::Other, message))
             },
-            ok => ok,
         }
     }
 }