mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-10 15:16:56 +00:00
@@ -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()))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user