From c16768b22471dbc7e8449b74b8f67dd41c80bba2 Mon Sep 17 00:00:00 2001 From: drendog Date: Wed, 21 Aug 2024 13:50:49 +0200 Subject: [PATCH] chore: add missing must use on state builder --- src/windowing/state/builder.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/windowing/state/builder.rs b/src/windowing/state/builder.rs index b5fe076..0a0ff8c 100644 --- a/src/windowing/state/builder.rs +++ b/src/windowing/state/builder.rs @@ -21,55 +21,66 @@ pub struct WindowStateBuilder { } impl WindowStateBuilder { + #[must_use] pub fn new() -> Self { Self::default() } + #[must_use] pub fn with_surface(mut self, surface: Rc) -> Self { self.surface = Some(surface); self } + #[must_use] pub fn with_layer_surface(mut self, layer_surface: Rc) -> Self { self.layer_surface = Some(layer_surface); self } + #[must_use] pub const fn with_size(mut self, size: PhysicalSize) -> Self { self.size = Some(size); self } + #[must_use] pub const fn with_output_size(mut self, output_size: PhysicalSize) -> Self { self.output_size = Some(output_size); self } + #[must_use] pub fn with_pointer(mut self, pointer: Rc) -> Self { self.pointer = Some(pointer); self } + #[must_use] pub fn with_window(mut self, window: Rc) -> Self { self.window = Some(window); self } + #[must_use] pub const fn with_scale_factor(mut self, scale_factor: f32) -> Self { self.scale_factor = scale_factor; self } + #[must_use] pub const fn with_height(mut self, height: u32) -> Self { self.height = height; self } + #[must_use] pub const fn with_exclusive_zone(mut self, exclusive_zone: i32) -> Self { self.exclusive_zone = exclusive_zone; self } + #[must_use] pub fn with_component_definition(mut self, component_definition: ComponentDefinition) -> Self { self.component_definition = Some(component_definition); self