1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 00:44:26 +02:00

use mem::take where possible (#1507)

This commit is contained in:
Rob Ede
2020-05-17 02:54:42 +01:00
committed by GitHub
parent 201090d7a2
commit f3b0233477
10 changed files with 20 additions and 32 deletions

View File

@ -429,7 +429,7 @@ where
let mut rmap = ResourceMap::new(ResourceDef::root_prefix(&self.rdef));
// external resources
for mut rdef in std::mem::replace(&mut self.external, Vec::new()) {
for mut rdef in std::mem::take(&mut self.external) {
rmap.add(&mut rdef, None);
}