mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #20776 - mbrubeck:impl, r=SimonSapin
Replace a boxed iterator with impl Trait --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because they don't change behavior <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20776) <!-- Reviewable:end -->
This commit is contained in:
commit
a8bdd44ece
1 changed files with 3 additions and 3 deletions
|
@ -175,14 +175,14 @@ impl CookieStorage {
|
|||
pub fn cookies_data_for_url<'a>(&'a mut self,
|
||||
url: &'a ServoUrl,
|
||||
source: CookieSource)
|
||||
-> Box<Iterator<Item = cookie_rs::Cookie<'static>> + 'a> {
|
||||
-> impl Iterator<Item = cookie_rs::Cookie<'static>> + 'a {
|
||||
let domain = reg_host(url.host_str().unwrap_or(""));
|
||||
let cookies = self.cookies_map.entry(domain).or_insert(vec![]);
|
||||
|
||||
Box::new(cookies.iter_mut().filter(move |c| c.appropriate_for_url(url, source)).map(|c| {
|
||||
cookies.iter_mut().filter(move |c| c.appropriate_for_url(url, source)).map(|c| {
|
||||
c.touch();
|
||||
c.cookie.clone()
|
||||
}))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue