From 98545a16dd9e469271fe480cc6f8d9991cd25444 Mon Sep 17 00:00:00 2001 From: KokaKiwi Date: Fri, 18 Feb 2022 17:05:19 +0100 Subject: garage_api: Handle streaming payload early in request handling --- src/api/signature/streaming.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/api/signature') diff --git a/src/api/signature/streaming.rs b/src/api/signature/streaming.rs index b2dc1591..b04e5c72 100644 --- a/src/api/signature/streaming.rs +++ b/src/api/signature/streaming.rs @@ -164,15 +164,15 @@ where datetime: DateTime, scope: &str, seed_signature: Hash, - ) -> Result { - Ok(Self { + ) -> Self { + Self { stream, buf: bytes::BytesMut::new(), datetime, scope: scope.into(), signing_hmac, previous_signature: seed_signature, - }) + } } fn parse_next(input: &[u8]) -> nom::IResult<&[u8], SignedPayload, SignedPayloadStreamError> { -- cgit v1.2.3