Skip to content

Commit

Permalink
which_v4_to_date: refacto
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Mar 14, 2024
1 parent 3b35fc2 commit 6a41f3c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2326,14 +2326,13 @@ impl FromStr for RicCall {
}
}

fn which_v4_to_date(which_v4: & String) -> &str
fn which_v4_to_date(which_v4: & str) -> &str
{
if which_v4 == "OSC4" {
return "X-Osc-Date"
} else if which_v4 == "AWS4" {
return "X-Amz-Date"
match which_v4 {
"OSC4" => "X-Osc-Date",
"AWS4" => "X-Amz-Date",
_ => "X-Unknow-Date"
}
"X-Unknow-Date"
}

fn clasify_v4(userpass: & str) -> Option<(&str, String)>
Expand Down

0 comments on commit 6a41f3c

Please sign in to comment.