fix clippy

Signed-off-by: junxiang Mu <1948535941@qq.com>
This commit is contained in:
junxiang Mu
2024-10-12 14:09:52 +08:00
parent adef6476ec
commit a0e37098bb
37 changed files with 322 additions and 384 deletions
+2 -5
View File
@@ -67,11 +67,8 @@ impl Error {
}
pub fn to_io_err(&self) -> Option<io::Error> {
if let Some(e) = self.downcast_ref::<io::Error>() {
Some(io::Error::new(e.kind(), e.to_string()))
} else {
None
}
self.downcast_ref::<io::Error>()
.map(|e| io::Error::new(e.kind(), e.to_string()))
}
}