summaryrefslogtreecommitdiffstats
path: root/graphics/src
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src')
-rw-r--r--graphics/src/renderer.rs4
-rw-r--r--graphics/src/widget/canvas/cache.rs6
2 files changed, 7 insertions, 3 deletions
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs
index aabdf7fc..298cf4a1 100644
--- a/graphics/src/renderer.rs
+++ b/graphics/src/renderer.rs
@@ -53,9 +53,9 @@ where
{
type Theme = T;
- fn layout<'a, Message>(
+ fn layout<Message>(
&mut self,
- element: &Element<'a, Message, Self>,
+ element: &Element<'_, Message, Self>,
limits: &layout::Limits,
) -> layout::Node {
let layout = element.as_widget().layout(self, limits);
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 {