Commit fadfecce authored by Nugine's avatar Nugine
Browse files

fix(s3s): clippy lints

parent 1f932007
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ fn parse_host_header<'a>(base_domain: &'a str, host: &'a str) -> Option<VirtualH

    if let Some(bucket) = host.strip_suffix(base_domain).and_then(|h| h.strip_suffix('.')) {
        return Some(VirtualHost::with_bucket(base_domain, bucket));
    };
    }

    None
}
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ impl AwsChunkedStream {
                            None => break,
                            Some(Err(e)) => return Err(AwsChunkedStreamError::Underlying(e)),
                            Some(Ok(remaining_bytes)) => prev_bytes = remaining_bytes,
                        };
                        }
                        if let Ok((_, meta)) = parse_chunk_meta(&buf) {
                            meta
                        } else {
+5 −5
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ where
            None => return Err(MultipartError::InvalidFormat),
            Some(Err(e)) => return Err(MultipartError::Underlying(e)),
            Some(Ok(bytes)) => buf.extend_from_slice(&bytes),
        };
        }

        // try to parse
        match try_parse(body, pat, &buf, &mut fields, boundary) {
@@ -139,7 +139,7 @@ where
                Some(line) => {
                    if line != pat_without_crlf {
                        return Ok(Err(MultipartError::InvalidFormat));
                    };
                    }
                }
            }
        }
@@ -148,7 +148,7 @@ where
                return Ok(Err(MultipartError::InvalidFormat));
            }
        }
    };
    }

    let mut headers = [httparse::EMPTY_HEADER; 2];
    loop {
@@ -280,7 +280,7 @@ impl FileStream {
                            None => return Err(FileStreamError::Incomplete),
                            Some(Err(e)) => return Err(FileStreamError::Underlying(e)),
                            Some(Ok(b)) => bytes = b,
                        };
                        }
                        state = 2;
                        continue 'dfa;
                    }
@@ -318,7 +318,7 @@ impl FileStream {
                            None => return Err(FileStreamError::Incomplete),
                            Some(Err(e)) => return Err(FileStreamError::Underlying(e)),
                            Some(Ok(b)) => buf.extend_from_slice(&b),
                        };
                        }
                        bytes = Bytes::from(mem::take(&mut buf));
                        state = 2;
                        continue 'dfa;