Skip to content
Snippets Groups Projects

Replace a match with some as_ref and as

Merged Ian Jackson requested to merge Diziet/arti:clippy into main
1 file
+ 1
4
Compare changes
  • Side-by-side
  • Inline
@@ -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 _)
}
}
Loading