Unverified Commit 50f00346 authored by Nugine's avatar Nugine
Browse files

fmt: let else

parent 9982417a
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -132,14 +132,18 @@ pub fn parse_opt_query_timestamp(req: &Request, name: &str, fmt: TimestampFormat

#[track_caller]
pub fn unwrap_bucket(req: &mut Request) -> String {
    let Some(S3Path::Bucket { bucket }) = req.s3ext.s3_path.take() else { panic!("s3 path not found") };
    bucket.into()
    match req.s3ext.s3_path.take() {
        Some(S3Path::Bucket { bucket }) => bucket.into(),
        _ => panic!("s3 path not found, expected bucket"),
    }
}

#[track_caller]
pub fn unwrap_object(req: &mut Request) -> (String, String) {
    let Some(S3Path::Object { bucket, key }) = req.s3ext.s3_path.take() else { panic!("s3 path not found") };
    (bucket.into(), key.into())
    match req.s3ext.s3_path.take() {
        Some(S3Path::Object { bucket, key }) => (bucket.into(), key.into()),
        _ => panic!("s3 path not found, expected object"),
    }
}

fn malformed_xml(source: xml::DeError) -> S3Error {
+1 −0
Original line number Diff line number Diff line
max_width = 130
fn_call_width = 90
single_line_let_else_max_width = 100
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.