mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-02 17:46:38 +02:00
use mem::take where possible (#1507)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use std::collections::HashSet;
|
||||
use std::mem::replace;
|
||||
use std::mem;
|
||||
|
||||
use time::{Duration, OffsetDateTime};
|
||||
|
||||
@@ -273,7 +273,7 @@ impl CookieJar {
|
||||
)]
|
||||
pub fn clear(&mut self) {
|
||||
self.delta_cookies.clear();
|
||||
for delta in replace(&mut self.original_cookies, HashSet::new()) {
|
||||
for delta in mem::take(&mut self.original_cookies) {
|
||||
self.remove(delta.cookie);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user