Remove strum crate dependency; add protobuf nix dependency

This commit is contained in:
Alex Auvolat
2022-02-21 23:10:13 +01:00
parent 55d4471599
commit f0d0cd9a20
6 changed files with 5 additions and 57 deletions
-3
View File
@@ -31,9 +31,6 @@ md-5 = "0.9"
nom = "7.1"
sha2 = "0.9"
strum = "0.23"
strum_macros = "0.23"
futures = "0.3"
futures-util = "0.3"
pin-project = "1.0"
+1 -1
View File
@@ -135,7 +135,7 @@ async fn handler_inner(garage: Arc<Garage>, req: Request<Body>) -> Result<Respon
Context::current()
.span()
.update_name::<String>(format!("S3 API {}", endpoint));
.update_name::<String>(format!("S3 API {}", endpoint.name()));
// Some endpoints are processed early, before we even check for an API key
if let Endpoint::PostObject = endpoint {
+1 -3
View File
@@ -5,8 +5,6 @@ use std::borrow::Cow;
use hyper::header::HeaderValue;
use hyper::{HeaderMap, Method, Request};
use strum_macros::Display;
/// This macro is used to generate very repetitive match {} blocks in this module
/// It is _not_ made to be used anywhere else
macro_rules! s3_match {
@@ -135,7 +133,7 @@ s3_match! {@func
/// query parameters). Parameters it may receive by header are left out, however headers are
/// considered when required to determine between one endpoint or another (for CopyObject and
/// UploadObject, for instance).
#[derive(Debug, Clone, PartialEq, Eq, Display)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Endpoint {
AbortMultipartUpload {
key: String,