Skip to content
Snippets Groups Projects
Commit 7564fabd authored by Ian Jackson's avatar Ian Jackson
Browse files

Replace a match with some as_ref and as

The match was doing a deref coercion.

Found by current nightly's needless_match (whose suggestion doesn't
compile, https://github.com/rust-lang/rust-clippy/issues/8551 )
parent 9593cf63
No related branches found
No related tags found
No related merge requests found
......@@ -431,10 +431,7 @@ impl fmt::Display for Error {
impl std::error::Error for Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.source {
Some(e) => Some(e),
None => None,
}
self.source.as_ref().map(|s| s as _)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment