fix clippy issues (#301)
This commit is contained in:
parent
87e01ff32f
commit
7e64a98fd5
|
@ -105,7 +105,7 @@ pub fn parse(t: &str) -> Result<PathTemplate> {
|
|||
s = State::Parameter;
|
||||
} else if c == '}' {
|
||||
return Err(Error::InvalidPath("unexpected }".to_string()));
|
||||
} else if c != '/' || a.chars().last() != Some('/') {
|
||||
} else if c != '/' || !a.ends_with('/') {
|
||||
a.push(c);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ pub(crate) fn sanitize(input: &str, case: Case) -> String {
|
|||
"-1" => "minus1".to_string(),
|
||||
_ => to_case(
|
||||
&input
|
||||
.replace("'", "")
|
||||
.replace('\'', "")
|
||||
.replace(|c: char| !is_xid_continue(c), "-"),
|
||||
),
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue