Avoid triggering match_wildcard_for_single_variants

This commit is contained in:
Eduardo Broto 2020-05-21 14:47:13 +02:00
parent 7ff71199df
commit 1a04686fc0

View File

@ -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,
}
}
}