You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be really handy to have the retain method available (as per std::collections) in order to allow headers to be removed based upon a closure. This would, for example, avoid the double-scan and "clone key" issues when one has a list of headers that must be retained or removed:
let delete_list: Vec<HeaderName> = headers
.keys()
.filter(|k| !allowed_headers.contains(*k))
.map(|k| k.clone())
.collect::<Vec<HeaderName>>();
for header in delete_list {
headers.remove(header);
}
It would be really handy to have the
retain
method available (as per std::collections) in order to allow headers to be removed based upon a closure. This would, for example, avoid the double-scan and "clone key" issues when one has a list of headers that must be retained or removed:would be replaced with
The text was updated successfully, but these errors were encountered: