mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-16 00:53:47 -05:00
I think you can guess
This commit is contained in:
@@ -56,11 +56,11 @@ impl Version {
|
||||
};
|
||||
let minor: Option<u32> = c.name("minor").map(|minor| {
|
||||
positions.push((minor.start(), minor.end()));
|
||||
minor.as_str().parse().expect(&format!("Minor version invalid in tag {}", tag))
|
||||
minor.as_str().parse().unwrap_or_else(|_| panic!("Minor version invalid in tag {}", tag))
|
||||
});
|
||||
let patch: Option<u32> = c.name("patch").map(|patch| {
|
||||
positions.push((patch.start(), patch.end()));
|
||||
patch.as_str().parse().expect(&format!("Patch version invalid in tag {}", tag))
|
||||
patch.as_str().parse().unwrap_or_else(|_| panic!("Patch version invalid in tag {}", tag))
|
||||
});
|
||||
let mut format_str = tag.to_string();
|
||||
positions.reverse();
|
||||
|
||||
@@ -18,7 +18,7 @@ pub fn parse_www_authenticate(www_auth: &str) -> String {
|
||||
if *key == "realm" {
|
||||
return acc.to_owned() + value.as_escaped() + "?";
|
||||
} else {
|
||||
return format!("{}&{}={}", acc, key, value.as_escaped());
|
||||
format!("{}&{}={}", acc, key, value.as_escaped())
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user