1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-27 23:45:53 +02:00

use Cow for Params type

This commit is contained in:
Nikolay Kim
2017-12-27 18:41:09 -08:00
parent 556de72932
commit 19e1c1b75b
2 changed files with 13 additions and 9 deletions

View File

@@ -190,7 +190,8 @@ impl Pattern {
for capture in captures.iter() {
if let Some(ref m) = capture {
if idx != 0 {
req.match_info_mut().add(&self.names[idx-1], m.as_str());
req.match_info_mut().add(
self.names[idx-1].as_str(), m.as_str());
}
idx += 1;
}