From 2ec4486379a4ac3f3466f9685cee67c6e5ae4815 Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Thu, 15 May 2014 12:49:19 -0700 Subject: [PATCH 1/2] Make some cases of image_cache_task::Msg priv. --- src/components/net/image_cache_task.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/components/net/image_cache_task.rs b/src/components/net/image_cache_task.rs index d1642b20c0b..c09b9533f2b 100644 --- a/src/components/net/image_cache_task.rs +++ b/src/components/net/image_cache_task.rs @@ -23,16 +23,14 @@ pub enum Msg { Prefetch(Url), // FIXME: We can probably get rid of this Cell now - // FIXME: make this priv after visibility rules change /// Used be the prefetch tasks to post back image binaries - StorePrefetchedImageData(Url, Result<~[u8], ()>), + priv StorePrefetchedImageData(Url, Result<~[u8], ()>), /// Tell the cache to decode an image. Must be posted before GetImage/WaitForImage Decode(Url), /// Used by the decoder tasks to post decoded images back to the cache - // FIXME: make this priv after visibility rules change - StoreImage(Url, Option>), + priv StoreImage(Url, Option>), /// Request an Image object for a URL. If the image is not is not immediately /// available then ImageNotReady is returned. @@ -45,12 +43,10 @@ pub enum Msg { Exit(Sender<()>), /// For testing - // FIXME: make this priv after visibility rules change - WaitForStore(Sender<()>), + priv WaitForStore(Sender<()>), /// For testing - // FIXME: make this priv after visibility rules change - WaitForStorePrefetched(Sender<()>), + priv WaitForStorePrefetched(Sender<()>), } #[deriving(Clone)] From dbf260ac1f1c8b2dbec317652c4dbf94133a3df7 Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Thu, 15 May 2014 13:20:39 -0700 Subject: [PATCH 2/2] Reorder the cases of image_cache_task::Msg so that the priv ones are adjacent. --- src/components/net/image_cache_task.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/net/image_cache_task.rs b/src/components/net/image_cache_task.rs index c09b9533f2b..63abfd62348 100644 --- a/src/components/net/image_cache_task.rs +++ b/src/components/net/image_cache_task.rs @@ -22,16 +22,9 @@ pub enum Msg { /// before Decode Prefetch(Url), - // FIXME: We can probably get rid of this Cell now - /// Used be the prefetch tasks to post back image binaries - priv StorePrefetchedImageData(Url, Result<~[u8], ()>), - /// Tell the cache to decode an image. Must be posted before GetImage/WaitForImage Decode(Url), - /// Used by the decoder tasks to post decoded images back to the cache - priv StoreImage(Url, Option>), - /// Request an Image object for a URL. If the image is not is not immediately /// available then ImageNotReady is returned. GetImage(Url, Sender), @@ -42,6 +35,13 @@ pub enum Msg { /// Clients must wait for a response before shutting down the ResourceTask Exit(Sender<()>), + // FIXME: We can probably get rid of this Cell now + /// Used be the prefetch tasks to post back image binaries + priv StorePrefetchedImageData(Url, Result<~[u8], ()>), + + /// Used by the decoder tasks to post decoded images back to the cache + priv StoreImage(Url, Option>), + /// For testing priv WaitForStore(Sender<()>),