Loading crates/s3s-aws/src/proxy/meta.rs +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ use aws_sdk_s3::operation::{RequestId, RequestIdExt}; use hyper::HeaderMap; use hyper::header::HeaderValue; pub fn build_headers<T>(output: &T) -> S3Result<HeaderMap<HeaderValue>> pub fn build_headers<T>(output: &T) -> S3Result<HeaderMap> where T: RequestId + RequestIdExt, { Loading crates/s3s/src/dto/etag.rs +1 −2 Original line number Diff line number Diff line use bytes::Bytes; use http::HeaderValue; use http::header::InvalidHeaderValue; use stdx::str::StrExt; Loading Loading @@ -135,7 +134,7 @@ impl ETag { buf } }; HeaderValue::from_maybe_shared(Bytes::from(buf)) HeaderValue::try_from(buf) } } Loading crates/s3s/src/http/aws_chunked_stream.rs +3 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ pub struct AwsChunkedStream { remaining_length: usize, // Parsed trailing headers (lower-cased names) if present and verified. trailers: Arc<Mutex<Option<HeaderMap<HeaderValue>>>>, trailers: Arc<Mutex<Option<HeaderMap>>>, } impl Debug for AwsChunkedStream { Loading Loading @@ -139,7 +139,7 @@ impl AwsChunkedStream { where S: Stream<Item = Result<Bytes, StdError>> + Send + Sync + 'static, { let trailers: Arc<Mutex<Option<HeaderMap<HeaderValue>>>> = Arc::new(Mutex::new(None)); let trailers: Arc<Mutex<Option<HeaderMap>>> = Arc::new(Mutex::new(None)); let trailers_for_worker = Arc::clone(&trailers); let inner = AsyncTryStream::<_, _, SyncBoxFuture<'static, Result<(), AwsChunkedStreamError>>>::new(|mut y| { #[allow(clippy::shadow_same)] // necessary for `pin_mut!` Loading Loading @@ -206,7 +206,7 @@ impl AwsChunkedStream { // However, if there are remaining bytes, we will just attempt to continue parsing // which will likely fail with FormatError. // Build HeaderMap from entries and store. let mut map: HeaderMap<HeaderValue> = HeaderMap::new(); let mut map: HeaderMap = HeaderMap::new(); for (name, value) in entries { // Names are already lower-cased ASCII let hn: HeaderName = match name.parse() { Loading crates/s3s/src/http/ordered_headers.rs +1 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ use hyper::HeaderMap; use hyper::header::ToStrError; use hyper::http::HeaderValue; use crate::utils::stable_sort_by_first; Loading Loading @@ -35,7 +34,7 @@ impl<'a> OrderedHeaders<'a> { /// /// # Errors /// Returns [`ToStrError`] if header value cannot be converted to string slice pub fn from_headers(map: &'a HeaderMap<HeaderValue>) -> Result<Self, ToStrError> { pub fn from_headers(map: &'a HeaderMap) -> Result<Self, ToStrError> { let mut headers: Vec<(&'a str, &'a str)> = Vec::with_capacity(map.len()); for (name, value) in map { Loading crates/s3s/src/http/request.rs +1 −2 Original line number Diff line number Diff line Loading @@ -12,13 +12,12 @@ use hyper::HeaderMap; use hyper::Method; use hyper::Uri; use hyper::http::Extensions; use hyper::http::HeaderValue; pub struct Request { pub version: http::Version, pub method: Method, pub uri: Uri, pub headers: HeaderMap<HeaderValue>, pub headers: HeaderMap, pub extensions: Extensions, pub body: Body, pub(crate) s3ext: S3Extensions, Loading Loading
crates/s3s-aws/src/proxy/meta.rs +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ use aws_sdk_s3::operation::{RequestId, RequestIdExt}; use hyper::HeaderMap; use hyper::header::HeaderValue; pub fn build_headers<T>(output: &T) -> S3Result<HeaderMap<HeaderValue>> pub fn build_headers<T>(output: &T) -> S3Result<HeaderMap> where T: RequestId + RequestIdExt, { Loading
crates/s3s/src/dto/etag.rs +1 −2 Original line number Diff line number Diff line use bytes::Bytes; use http::HeaderValue; use http::header::InvalidHeaderValue; use stdx::str::StrExt; Loading Loading @@ -135,7 +134,7 @@ impl ETag { buf } }; HeaderValue::from_maybe_shared(Bytes::from(buf)) HeaderValue::try_from(buf) } } Loading
crates/s3s/src/http/aws_chunked_stream.rs +3 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ pub struct AwsChunkedStream { remaining_length: usize, // Parsed trailing headers (lower-cased names) if present and verified. trailers: Arc<Mutex<Option<HeaderMap<HeaderValue>>>>, trailers: Arc<Mutex<Option<HeaderMap>>>, } impl Debug for AwsChunkedStream { Loading Loading @@ -139,7 +139,7 @@ impl AwsChunkedStream { where S: Stream<Item = Result<Bytes, StdError>> + Send + Sync + 'static, { let trailers: Arc<Mutex<Option<HeaderMap<HeaderValue>>>> = Arc::new(Mutex::new(None)); let trailers: Arc<Mutex<Option<HeaderMap>>> = Arc::new(Mutex::new(None)); let trailers_for_worker = Arc::clone(&trailers); let inner = AsyncTryStream::<_, _, SyncBoxFuture<'static, Result<(), AwsChunkedStreamError>>>::new(|mut y| { #[allow(clippy::shadow_same)] // necessary for `pin_mut!` Loading Loading @@ -206,7 +206,7 @@ impl AwsChunkedStream { // However, if there are remaining bytes, we will just attempt to continue parsing // which will likely fail with FormatError. // Build HeaderMap from entries and store. let mut map: HeaderMap<HeaderValue> = HeaderMap::new(); let mut map: HeaderMap = HeaderMap::new(); for (name, value) in entries { // Names are already lower-cased ASCII let hn: HeaderName = match name.parse() { Loading
crates/s3s/src/http/ordered_headers.rs +1 −2 Original line number Diff line number Diff line Loading @@ -2,7 +2,6 @@ use hyper::HeaderMap; use hyper::header::ToStrError; use hyper::http::HeaderValue; use crate::utils::stable_sort_by_first; Loading Loading @@ -35,7 +34,7 @@ impl<'a> OrderedHeaders<'a> { /// /// # Errors /// Returns [`ToStrError`] if header value cannot be converted to string slice pub fn from_headers(map: &'a HeaderMap<HeaderValue>) -> Result<Self, ToStrError> { pub fn from_headers(map: &'a HeaderMap) -> Result<Self, ToStrError> { let mut headers: Vec<(&'a str, &'a str)> = Vec::with_capacity(map.len()); for (name, value) in map { Loading
crates/s3s/src/http/request.rs +1 −2 Original line number Diff line number Diff line Loading @@ -12,13 +12,12 @@ use hyper::HeaderMap; use hyper::Method; use hyper::Uri; use hyper::http::Extensions; use hyper::http::HeaderValue; pub struct Request { pub version: http::Version, pub method: Method, pub uri: Uri, pub headers: HeaderMap<HeaderValue>, pub headers: HeaderMap, pub extensions: Extensions, pub body: Body, pub(crate) s3ext: S3Extensions, Loading