diff options
Diffstat (limited to '')
| -rw-r--r-- | graphics/src/widget/canvas/cache.rs | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/graphics/src/widget/canvas/cache.rs b/graphics/src/widget/canvas/cache.rs index 49873ac9..52217bbb 100644 --- a/graphics/src/widget/canvas/cache.rs +++ b/graphics/src/widget/canvas/cache.rs @@ -49,7 +49,11 @@ impl Cache {      /// Otherwise, the previously stored [`Geometry`] will be returned. The      /// [`Cache`] is not cleared in this case. In other words, it will keep      /// returning the stored [`Geometry`] if needed. -    pub fn draw(&self, bounds: Size, draw_fn: impl Fn(&mut Frame)) -> Geometry { +    pub fn draw( +        &self, +        bounds: Size, +        draw_fn: impl FnOnce(&mut Frame), +    ) -> Geometry {          use std::ops::Deref;          if let State::Filled { | 
