Skip to content

Commit

Permalink
fix ci failed
Browse files Browse the repository at this point in the history
  • Loading branch information
zjregee committed Mar 5, 2024
1 parent f914dc3 commit 79ad5a1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions core/src/services/dropbox/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,14 @@ impl DropboxCore {
(path, Ok(RpDelete::default().into()))
}
"failure" => {
let error = entry.error.expect("error should be present");
let err = Error::new(
ErrorKind::Unexpected,
&format!("delete failed with error {}", error.error_summary),
);
let err = if let Some(error) = entry.error {
Error::new(
ErrorKind::Unexpected,
&format!("delete failed with error {}", error.error_summary),
)
} else {
Error::new(ErrorKind::Unexpected, "delete failed")
};
("".to_string(), Err(err))
}
_ => (
Expand Down

0 comments on commit 79ad5a1

Please sign in to comment.