From d8636a31bda5139a6ba7f19df3c4212dd6c11bd6 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 5 Dec 2024 12:03:29 +0800 Subject: [PATCH] chore: Fix clippy warnings. (#465) --- crates/ui/src/root.rs | 4 ++-- crates/ui/src/theme.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/ui/src/root.rs b/crates/ui/src/root.rs index 8f58eb7d..3a526808 100644 --- a/crates/ui/src/root.rs +++ b/crates/ui/src/root.rs @@ -47,7 +47,7 @@ pub trait ContextModal: Sized { fn notifications(&self) -> Rc>>; } -impl<'a> ContextModal for WindowContext<'a> { +impl ContextModal for WindowContext<'_> { fn open_drawer(&mut self, build: F) where F: Fn(Drawer, &mut WindowContext) -> Drawer + 'static, @@ -148,7 +148,7 @@ impl<'a> ContextModal for WindowContext<'a> { Rc::new(Root::read(&self).notification.read(&self).notifications()) } } -impl<'a, V> ContextModal for ViewContext<'a, V> { +impl ContextModal for ViewContext<'_, V> { fn open_drawer(&mut self, build: F) where F: Fn(Drawer, &mut WindowContext) -> Drawer + 'static, diff --git a/crates/ui/src/theme.rs b/crates/ui/src/theme.rs index 1015fa60..fb7d2877 100644 --- a/crates/ui/src/theme.rs +++ b/crates/ui/src/theme.rs @@ -19,19 +19,19 @@ impl ActiveTheme for AppContext { } } -impl<'a, V> ActiveTheme for ViewContext<'a, V> { +impl ActiveTheme for ViewContext<'_, V> { fn theme(&self) -> &Theme { self.deref().theme() } } -impl<'a, V> ActiveTheme for ModelContext<'a, V> { +impl ActiveTheme for ModelContext<'_, V> { fn theme(&self) -> &Theme { self.deref().theme() } } -impl<'a> ActiveTheme for WindowContext<'a> { +impl ActiveTheme for WindowContext<'_> { fn theme(&self) -> &Theme { self.deref().theme() }