From 21d919e2d2a38802ba96003597eadb68342d71ef Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Tue, 29 Jun 2021 12:33:24 +0200 Subject: Put incremental compilation behind feature --- src/cache.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cache.rs') diff --git a/src/cache.rs b/src/cache.rs index aa9c10a0..2aa276aa 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -2,6 +2,7 @@ use crate::font::FontCache; use crate::image::ImageCache; +#[cfg(feature = "layout-cache")] use crate::layout::LayoutCache; use crate::loading::Loader; @@ -12,6 +13,7 @@ pub struct Cache { /// Caches decoded images. pub image: ImageCache, /// Caches layouting artifacts. + #[cfg(feature = "layout-cache")] pub layout: LayoutCache, } @@ -21,6 +23,7 @@ impl Cache { Self { font: FontCache::new(loader), image: ImageCache::new(), + #[cfg(feature = "layout-cache")] layout: LayoutCache::new(), } } -- cgit v1.2.3