Skip to content

Commit

Permalink
fix(services/icloud): adjust error handling code to avoid having to w…
Browse files Browse the repository at this point in the history
…rite out result type explicitly (#5091)
  • Loading branch information
koushiro authored Sep 3, 2024
1 parent 782e66a commit 0c70ae8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/src/services/icloud/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,11 +526,11 @@ impl PathQuery for IcloudPathQuery {

let node = &root[0];

let id = match node.items.iter().find(|it| it.name == name) {
Some(it) => Ok(Some(it.drivewsid.clone())),
None => Ok(None),
}?;
Ok(id)
Ok(node
.items
.iter()
.find(|it| it.name == name)
.map(|it| it.drivewsid.clone()))
}

async fn create_dir(&self, parent_id: &str, name: &str) -> Result<String> {
Expand Down

0 comments on commit 0c70ae8

Please sign in to comment.