mirror of https://github.com/fafhrd91/actix-net
clippy
This commit is contained in:
parent
9b9307cc30
commit
c48780021b
|
@ -573,10 +573,9 @@ impl ResourceDef {
|
||||||
PatternType::Prefix(ref prefix) => is_strict_prefix(prefix, path),
|
PatternType::Prefix(ref prefix) => is_strict_prefix(prefix, path),
|
||||||
|
|
||||||
// dynamic prefix
|
// dynamic prefix
|
||||||
PatternType::Dynamic(ref re, _) if !re.as_str().ends_with("$") => {
|
PatternType::Dynamic(ref re, _) if !re.as_str().ends_with('$') => {
|
||||||
match re.find(path) {
|
match re.find(path) {
|
||||||
// prefix matches exactly
|
// prefix matches exactly
|
||||||
// TODO: im p sure tail segments will hit this now too
|
|
||||||
Some(m) if m.end() == path.len() => true,
|
Some(m) if m.end() == path.len() => true,
|
||||||
|
|
||||||
// prefix matches part
|
// prefix matches part
|
||||||
|
@ -639,10 +638,9 @@ impl ResourceDef {
|
||||||
PatternType::Prefix(_) => None,
|
PatternType::Prefix(_) => None,
|
||||||
|
|
||||||
// dynamic prefix
|
// dynamic prefix
|
||||||
PatternType::Dynamic(ref re, _) if !re.as_str().ends_with("$") => {
|
PatternType::Dynamic(ref re, _) if !re.as_str().ends_with('$') => {
|
||||||
match re.find(path) {
|
match re.find(path) {
|
||||||
// prefix matches exactly
|
// prefix matches exactly
|
||||||
// TODO: im p sure tail segments will hit this now too
|
|
||||||
Some(m) if m.end() == path.len() => Some(m.end()),
|
Some(m) if m.end() == path.len() => Some(m.end()),
|
||||||
|
|
||||||
// prefix matches part
|
// prefix matches part
|
||||||
|
|
Loading…
Reference in New Issue