mirror of
https://github.com/fafhrd91/actix-net
synced 2025-06-28 20:10:35 +02:00
Fix code style (#65)
* Fix clippy warnings * cargo fmt * Remove redundant lifetime
This commit is contained in:
@ -89,9 +89,9 @@ impl ResourceDef {
|
||||
.collect();
|
||||
PatternType::Dynamic(re, names, len)
|
||||
} else if for_prefix {
|
||||
PatternType::Prefix(pattern.clone())
|
||||
PatternType::Prefix(pattern)
|
||||
} else {
|
||||
PatternType::Static(pattern.clone())
|
||||
PatternType::Static(pattern)
|
||||
};
|
||||
|
||||
ResourceDef {
|
||||
@ -99,7 +99,7 @@ impl ResourceDef {
|
||||
elements,
|
||||
id: 0,
|
||||
name: String::new(),
|
||||
pattern: path.to_owned(),
|
||||
pattern: path,
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,7 +234,8 @@ impl ResourceDef {
|
||||
} else {
|
||||
return false;
|
||||
};
|
||||
path.skip(min(rpath.len(), len) as u16);
|
||||
let rpath_len = rpath.len();
|
||||
path.skip(min(rpath_len, len) as u16);
|
||||
true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user