chore: add missing must use on state builder
parent
fc2e3944b4
commit
c16768b224
|
@ -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<WlSurface>) -> Self {
|
||||
self.surface = Some(surface);
|
||||
self
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_layer_surface(mut self, layer_surface: Rc<ZwlrLayerSurfaceV1>) -> 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<WlPointer>) -> Self {
|
||||
self.pointer = Some(pointer);
|
||||
self
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_window(mut self, window: Rc<FemtoVGWindow>) -> 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
|
||||
|
|
Loading…
Reference in New Issue