suyanhanx commented on code in PR #2879:
URL: 
https://github.com/apache/incubator-opendal/pull/2879#discussion_r1299081935


##########
bin/oay/src/services/webdav/webdav_dir_entry.rs:
##########
@@ -35,8 +36,10 @@ impl DavDirEntry for WebDAVDirEntry {
 
     fn metadata(&self) -> dav_server::fs::FsFuture<Box<dyn 
dav_server::fs::DavMetaData>> {
         async move {
-            let metedata = self.op.stat(self.dir_entry.path()).await.unwrap();
-            Ok(Box::new(WebdavMetaData::new(metedata)) as Box<dyn DavMetaData>)
+            self.op.stat(self.dir_entry.path()).await.map_or_else(

Review Comment:
   This is splitting `map_or_else` into `map` and `map_err`. As the  `map_err` 
part are the same, we may extract it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to