1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 08:57:00 +02:00

Allow to use path without traling slashes for scope registration #241

This commit is contained in:
Nikolay Kim
2018-05-23 13:21:29 -07:00
parent 72757887c9
commit 68eb2f26c9
11 changed files with 107 additions and 59 deletions

View File

@@ -58,12 +58,11 @@ impl<'a> Params<'a> {
self.0.push((name, value));
}
pub(crate) fn remove(&mut self, name: &str)
{
pub(crate) fn remove(&mut self, name: &str) {
for idx in (0..self.0.len()).rev() {
if self.0[idx].0 == name {
self.0.remove(idx);
return
return;
}
}
}