style(api): reformat two error arms
Pre-existing rustfmt drift on the branch base; `just ci` fails on it before reaching anything else.
This commit is contained in:
@@ -734,11 +734,7 @@ async fn remove_library_files(state: &AppState, scope: FileScope) -> Result<(),
|
||||
Ok(metadata) => metadata,
|
||||
// Already gone is the state we wanted.
|
||||
Err(error) if error.kind() == std::io::ErrorKind::NotFound => continue,
|
||||
Err(error) => {
|
||||
return Err(ApiError::Filesystem(format!(
|
||||
"files not removed: {error}"
|
||||
)))
|
||||
}
|
||||
Err(error) => return Err(ApiError::Filesystem(format!("files not removed: {error}"))),
|
||||
};
|
||||
let removed = if metadata.is_dir() {
|
||||
tokio::fs::remove_dir_all(&target).await
|
||||
@@ -748,11 +744,7 @@ async fn remove_library_files(state: &AppState, scope: FileScope) -> Result<(),
|
||||
match removed {
|
||||
Ok(()) => tracing::info!(target = %target.display(), "removed library files"),
|
||||
Err(error) if error.kind() == std::io::ErrorKind::NotFound => {}
|
||||
Err(error) => {
|
||||
return Err(ApiError::Filesystem(format!(
|
||||
"files not removed: {error}"
|
||||
)))
|
||||
}
|
||||
Err(error) => return Err(ApiError::Filesystem(format!("files not removed: {error}"))),
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user