clippy fix
This commit is contained in:
parent
b9e553f112
commit
0efde0e134
2 changed files with 2 additions and 1 deletions
|
|
@ -121,6 +121,7 @@ impl Error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
pub fn get_invalid_param(&self) -> Option<&Parameter> {
|
pub fn get_invalid_param(&self) -> Option<&Parameter> {
|
||||||
if let Self::InvalidParameter(p) = self {
|
if let Self::InvalidParameter(p) = self {
|
||||||
Some(p)
|
Some(p)
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ impl From<String> for Uri {
|
||||||
SHARRY_URI_RE.captures(value).map(|caps| {
|
SHARRY_URI_RE.captures(value).map(|caps| {
|
||||||
let captured = |name| {
|
let captured = |name| {
|
||||||
caps.name(name)
|
caps.name(name)
|
||||||
.expect(&format!("{name} not captured"))
|
.unwrap_or_else(|| panic!("{name} not captured"))
|
||||||
.as_str()
|
.as_str()
|
||||||
.to_string()
|
.to_string()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue