aboutsummaryrefslogtreecommitdiff
path: root/src/api/generic_server.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-07 14:53:13 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-07 14:53:13 +0100
commit53746b59e525ff5f518ed59d7831b05e2732785d (patch)
tree605816d809673c17d0443815fef3bb412cdd9522 /src/api/generic_server.rs
parenta31d1bd4969654e6041070b6e80ae025925808c2 (diff)
downloadgarage-53746b59e525ff5f518ed59d7831b05e2732785d.tar.gz
garage-53746b59e525ff5f518ed59d7831b05e2732785d.zip
[dep-upgrade-202402] slightly more explicit error management
Diffstat (limited to 'src/api/generic_server.rs')
-rw-r--r--src/api/generic_server.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/generic_server.rs b/src/api/generic_server.rs
index 20d70833..7b37417e 100644
--- a/src/api/generic_server.rs
+++ b/src/api/generic_server.rs
@@ -1,3 +1,4 @@
+use std::convert::Infallible;
use std::fs::{self, Permissions};
use std::os::unix::fs::PermissionsExt;
use std::sync::Arc;
@@ -194,7 +195,8 @@ impl<A: ApiHandler> ApiServer<A> {
} else {
info!("Response: error {}, {}", e.http_status_code(), e);
}
- Ok(http_error.map(|body| BoxBody::new(body.map_err(|_| unreachable!()))))
+ Ok(http_error
+ .map(|body| BoxBody::new(body.map_err(|_: Infallible| unreachable!()))))
}
}
}