From ba5b6e6d8f17ad4c27bb400ad6144dad038dd8b9 Mon Sep 17 00:00:00 2001 From: drendog Date: Thu, 15 Aug 2024 07:46:52 +0200 Subject: [PATCH] refactor: remove useless clone --- src/windowing/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/windowing/mod.rs b/src/windowing/mod.rs index 1ee45c0..7c54191 100644 --- a/src/windowing/mod.rs +++ b/src/windowing/mod.rs @@ -300,10 +300,10 @@ impl<'a> WindowingSystem<'a> { let component_definition = self .config .component_definition - .clone() + .as_ref() .ok_or_else(|| anyhow::anyhow!("Component definition not set"))?; let (window, component_instance) = - self.initialize_slint_ui(renderer, &component_definition)?; + self.initialize_slint_ui(renderer, component_definition)?; self.window = Some(Rc::clone(&window)); self.state.borrow_mut().set_window(window);