Commit 7894b9c7 authored by Nugine's avatar Nugine
Browse files

fix lints

parent 64cfef9d
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ pub struct StructureMember {
pub struct OperationShape {
    pub input: OperationInput,
    pub output: OperationOutput,
    pub errors: Option<Vec<OperationError>>,
    // pub errors: Option<Vec<OperationError>>,
    pub traits: Traits,
}

@@ -74,7 +74,7 @@ pub struct OperationOutput {

#[derive(Debug, Deserialize)]
pub struct OperationError {
    pub target: String,
    // pub target: String,
}

#[derive(Debug, Deserialize)]
@@ -96,13 +96,13 @@ pub struct ListMember {

#[derive(Debug, Deserialize)]
pub struct ServiceShape {
    pub version: String,
    pub operations: Vec<ServiceOperation>,
    // pub version: String,
    // pub operations: Vec<ServiceOperation>,
}

#[derive(Debug, Deserialize)]
pub struct ServiceOperation {
    pub target: String,
    // pub target: String,
}

#[derive(Debug, Deserialize)]
@@ -125,13 +125,13 @@ pub struct EnumShape {

#[derive(Debug, Deserialize)]
pub struct EnumMember {
    pub target: String,
    // pub target: String,
    pub traits: Traits,
}

#[derive(Debug, Deserialize)]
pub struct BlobShape {
    pub traits: Traits,
    // pub traits: Traits,
}

#[derive(Debug, Deserialize)]
@@ -154,13 +154,13 @@ pub struct MapShape {
#[derive(Debug, Deserialize)]
pub struct MapKey {
    pub target: String,
    pub traits: Traits,
    // pub traits: Traits,
}

#[derive(Debug, Deserialize)]
pub struct MapValue {
    pub target: String,
    pub traits: Traits,
    // pub traits: Traits,
}

impl Traits {
+2 −0
Original line number Diff line number Diff line
@@ -20,8 +20,10 @@ use transform_stream::{AsyncTryStream, Yielder};
#[derive(Debug)]
pub struct File {
    /// name
    #[allow(dead_code)] // FIXME: discard this field?
    pub name: String,
    /// content type
    #[allow(dead_code)] // FIXME: discard this field?
    pub content_type: String,
    /// stream
    pub stream: Option<FileStream>,
+7 −0
Original line number Diff line number Diff line
@@ -178,6 +178,13 @@ impl SignatureContext<'_> {

        let presigned_url = PresignedUrlV4::parse(qs).map_err(|err| invalid_request!(err, "missing presigned url v4 fields"))?;

        if presigned_url.algorithm != "AWS4-HMAC-SHA256" {
            return Err(s3_error!(
                NotImplemented,
                "X-Amz-Algorithm other than AWS4-HMAC-SHA256 is not implemented"
            ));
        }

        // ASK: how to use it?
        let _content_sha256: Option<AmzContentSha256<'_>> = extract_amz_content_sha256(&self.hs)?;

+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ pub enum AmzContentSha256<'a> {
    /// single chunk
    SingleChunk {
        /// the checksum of single chunk payload
        #[allow(dead_code)] // TODO: check this field when calculating the payload checksum
        payload_checksum: &'a str,
    },
    /// `UNSIGNED-PAYLOAD`