Remove unused code from net and net_traits crates

This commit is contained in:
est31 2019-06-02 02:44:37 +02:00
parent 8dc7a25893
commit fe58aca75d
9 changed files with 0 additions and 259 deletions

View file

@ -108,16 +108,6 @@ impl CorsCache {
.find(|e| match_headers(e, request) && e.header_or_method.match_method(&method))
}
/// [Clear the cache](https://fetch.spec.whatwg.org/#concept-cache-clear)
pub fn clear(&mut self, request: &Request) {
let CorsCache(buf) = self.clone();
let new_buf: Vec<CorsCacheEntry> = buf
.into_iter()
.filter(|e| e.origin == request.origin && request.current_url() == e.url)
.collect();
*self = CorsCache(new_buf);
}
/// Remove old entries
pub fn cleanup(&mut self) {
let CorsCache(buf) = self.clone();

View file

@ -48,11 +48,6 @@ impl CacheKey {
url: servo_url.clone(),
}
}
/// Retrieve the URL associated with this key
pub fn url(&self) -> ServoUrl {
self.url.clone()
}
}
/// A complete cached resource.

View file

@ -535,9 +535,4 @@ impl ImageCache for ImageCacheImpl {
},
}
}
/// Ensure an image has a webrender key.
fn set_webrender_image_key(&self, image: &mut Image) {
set_webrender_image_key(&self.store.lock().unwrap().webrender_api, image);
}
}