aboutsummaryrefslogtreecommitdiffstats
path: root/components/net_traits/image_cache.rs
diff options
context:
space:
mode:
authorPyfisch <pyfisch@gmail.com>2018-11-03 16:18:44 +0100
committerPyfisch <pyfisch@gmail.com>2018-11-03 16:18:44 +0100
commitd41be1d56da658d41742690b1e8f3a8031139958 (patch)
tree10eb57a9d3e0a292f3b54345e1e45584f2f39e8b /components/net_traits/image_cache.rs
parentf512e262a54f2588e65cb28b3564ce1507488266 (diff)
downloadservo-d41be1d56da658d41742690b1e8f3a8031139958.tar.gz
servo-d41be1d56da658d41742690b1e8f3a8031139958.zip
Rustfmt net_traits crate
Diffstat (limited to 'components/net_traits/image_cache.rs')
-rw-r--r--components/net_traits/image_cache.rs15
1 files changed, 9 insertions, 6 deletions
diff --git a/components/net_traits/image_cache.rs b/components/net_traits/image_cache.rs
index ca6df6ee516..6e7f55d2233 100644
--- a/components/net_traits/image_cache.rs
+++ b/components/net_traits/image_cache.rs
@@ -101,16 +101,19 @@ pub enum UsePlaceholder {
// ======================================================================
pub trait ImageCache: Sync + Send {
- fn new(webrender_api: webrender_api::RenderApi) -> Self where Self: Sized;
+ fn new(webrender_api: webrender_api::RenderApi) -> Self
+ where
+ Self: Sized;
/// Return any available metadata or image for the given URL,
/// or an indication that the image is not yet available if it is in progress,
/// or else reserve a slot in the cache for the URL if the consumer can request images.
- fn find_image_or_metadata(&self,
- url: ServoUrl,
- use_placeholder: UsePlaceholder,
- can_request: CanRequestImages)
- -> Result<ImageOrMetadataAvailable, ImageState>;
+ fn find_image_or_metadata(
+ &self,
+ url: ServoUrl,
+ use_placeholder: UsePlaceholder,
+ can_request: CanRequestImages,
+ ) -> Result<ImageOrMetadataAvailable, ImageState>;
/// Add a new listener for the given pending image id. If the image is already present,
/// the responder will still receive the expected response.