diff --git a/crates/yakui-core/src/event.rs b/crates/yakui-core/src/event.rs index 26c52ba4..15b76ab4 100644 --- a/crates/yakui-core/src/event.rs +++ b/crates/yakui-core/src/event.rs @@ -7,7 +7,6 @@ use crate::input::{KeyCode, Modifiers, MouseButton}; /// An event that can be handled by yakui. #[derive(Debug)] -#[non_exhaustive] pub enum Event { /// The viewport has changed. This can mean resizing as well as positioning. ViewportChanged(Rect), @@ -49,7 +48,6 @@ pub enum Event { /// An event that can be handled by an individual widget. #[derive(Debug)] -#[non_exhaustive] pub enum WidgetEvent { /// The mouse entered the widget's layout rectangle. MouseEnter, @@ -68,7 +66,6 @@ pub enum WidgetEvent { /// A mouse button changed state while the cursor was inside the widget's /// layout rectangle. - #[non_exhaustive] MouseButtonChanged { /// Which button was changed. button: MouseButton, @@ -87,7 +84,6 @@ pub enum WidgetEvent { }, /// A keyboard key changed. - #[non_exhaustive] KeyChanged { /// Which key was changed. key: KeyCode, diff --git a/crates/yakui-core/src/layout/mod.rs b/crates/yakui-core/src/layout/mod.rs index 30e4df14..30de0208 100644 --- a/crates/yakui-core/src/layout/mod.rs +++ b/crates/yakui-core/src/layout/mod.rs @@ -27,7 +27,6 @@ pub struct LayoutDom { /// A node in a [`LayoutDom`]. #[derive(Debug)] -#[non_exhaustive] pub struct LayoutDomNode { /// The bounding rectangle of the node in logical pixels. pub rect: Rect, diff --git a/crates/yakui-core/src/paint/layers.rs b/crates/yakui-core/src/paint/layers.rs index de2deb73..1bf76a68 100644 --- a/crates/yakui-core/src/paint/layers.rs +++ b/crates/yakui-core/src/paint/layers.rs @@ -4,7 +4,6 @@ use super::PaintCall; /// Contains all of the draw calls for a single layer of the UI. #[derive(Debug)] -#[non_exhaustive] pub struct PaintLayer { /// The draw calls that can be used to paint this layer. pub calls: Vec, diff --git a/crates/yakui-core/src/paint/primitives.rs b/crates/yakui-core/src/paint/primitives.rs index 611e2239..07568e90 100644 --- a/crates/yakui-core/src/paint/primitives.rs +++ b/crates/yakui-core/src/paint/primitives.rs @@ -3,7 +3,6 @@ use glam::{Vec2, Vec4}; use crate::geometry::Rect; use crate::id::TextureId; -#[non_exhaustive] #[allow(missing_docs)] pub struct PaintMesh { pub vertices: V, @@ -30,7 +29,6 @@ where } #[derive(Debug)] -#[non_exhaustive] #[allow(missing_docs)] pub struct PaintCall { pub vertices: Vec, @@ -54,7 +52,6 @@ impl PaintCall { } #[derive(Debug, Clone, Copy)] -#[non_exhaustive] #[allow(missing_docs)] pub struct Vertex { pub position: Vec2, @@ -80,7 +77,6 @@ impl Vertex { /// The graphics pipeline that a draw call should be executed with. #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)] -#[non_exhaustive] pub enum Pipeline { /// Pipline for drawing most geometry: vertices and an optional color /// texture. diff --git a/crates/yakui-core/src/paint/rect.rs b/crates/yakui-core/src/paint/rect.rs index 83d5bd3b..ebb12794 100644 --- a/crates/yakui-core/src/paint/rect.rs +++ b/crates/yakui-core/src/paint/rect.rs @@ -19,7 +19,6 @@ const RECT_INDEX: [u16; 6] = [ 3, 0, 2, ]; -#[non_exhaustive] #[allow(missing_docs)] pub struct PaintRect { pub rect: Rect, diff --git a/crates/yakui-core/src/paint/texture.rs b/crates/yakui-core/src/paint/texture.rs index 25c5c6c0..4e26ecc3 100644 --- a/crates/yakui-core/src/paint/texture.rs +++ b/crates/yakui-core/src/paint/texture.rs @@ -31,7 +31,6 @@ impl std::fmt::Debug for Texture { /// A texture format that yakui can manage. #[derive(Debug, Clone, Copy, PartialEq, Eq)] -#[non_exhaustive] pub enum TextureFormat { /// Red, green, blue, and alpha channels, each represented as a `u8`. The /// color channels are sRGB-encoded. diff --git a/crates/yakui-core/src/types.rs b/crates/yakui-core/src/types.rs index c6cd9591..fd6dd562 100644 --- a/crates/yakui-core/src/types.rs +++ b/crates/yakui-core/src/types.rs @@ -4,7 +4,6 @@ use crate::geometry::{Constraints, Dim2, Vec2}; /// Defines how an object participates in layout. #[derive(Debug, Clone, Copy, PartialEq)] -#[non_exhaustive] pub enum Flow { /// The widget participates in list, grid, and table layouts. /// @@ -27,7 +26,6 @@ pub enum Flow { /// For example, a horizontal list's main axis is horizontal, and a vertical /// list's main axis is vertical. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -#[non_exhaustive] pub enum MainAxisSize { /// Make the container fill all available space along its main axis. Max, @@ -41,7 +39,6 @@ pub enum MainAxisSize { /// For example, a horizontal list's main axis is horizontal, and a vertical /// list's main axis is vertical. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -#[non_exhaustive] pub enum MainAxisAlignment { /// Align items to the beginning of the container's main axis. /// @@ -77,7 +74,6 @@ pub enum MainAxisAlignment { /// /// This occurs in a Grid when items of the same row are bigger than one self. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -#[non_exhaustive] pub enum MainAxisAlignItems { /// Align item to the beginning of the cell main axis. /// @@ -105,7 +101,6 @@ pub enum MainAxisAlignItems { /// For example, a horizontal list's cross axis is vertical, and a vertical /// list's cross axis is horizontal. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -#[non_exhaustive] pub enum CrossAxisAlignment { /// Align items to the beginning of the container's cross axis. /// @@ -130,7 +125,6 @@ pub enum CrossAxisAlignment { /// Defines the direction that a container will lay out its children. #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -#[non_exhaustive] pub enum Direction { /// Lay out children from top to bottom. Down, diff --git a/crates/yakui-core/src/widget.rs b/crates/yakui-core/src/widget.rs index a601e692..9d947975 100644 --- a/crates/yakui-core/src/widget.rs +++ b/crates/yakui-core/src/widget.rs @@ -21,7 +21,6 @@ pub trait Props: fmt::Debug {} impl Props for T where T: fmt::Debug {} /// Information available to a widget during the layout phase. -#[non_exhaustive] #[allow(missing_docs)] pub struct LayoutContext<'dom> { pub dom: &'dom Dom, @@ -41,7 +40,6 @@ impl<'dom> LayoutContext<'dom> { } /// Information available to a widget during the paint phase. -#[non_exhaustive] #[allow(missing_docs)] pub struct PaintContext<'dom> { pub dom: &'dom Dom, @@ -57,7 +55,6 @@ impl<'dom> PaintContext<'dom> { } /// Information available to a widget when it has received an event. -#[non_exhaustive] #[allow(missing_docs)] pub struct EventContext<'dom> { pub dom: &'dom Dom, @@ -66,7 +63,6 @@ pub struct EventContext<'dom> { } /// Information available to a widget when it is being queried for navigation. -#[non_exhaustive] #[allow(missing_docs)] pub struct NavigateContext<'dom> { pub dom: &'dom Dom, diff --git a/crates/yakui-vulkan/src/lib.rs b/crates/yakui-vulkan/src/lib.rs index 7ad67984..9a2f4780 100644 --- a/crates/yakui-vulkan/src/lib.rs +++ b/crates/yakui-vulkan/src/lib.rs @@ -50,7 +50,6 @@ pub struct YakuiVulkan { } /// Vulkan configuration -#[non_exhaustive] #[derive(Default)] pub struct Options { /// Indicates that VK_KHR_dynamic_rendering is enabled and should be used with the given format @@ -107,7 +106,6 @@ impl From for Workflow { match p { yakui_core::paint::Pipeline::Main => Workflow::Main, yakui_core::paint::Pipeline::Text => Workflow::Text, - _ => panic!("Unknown pipeline {p:?}"), } } } diff --git a/crates/yakui-vulkan/src/vulkan_texture.rs b/crates/yakui-vulkan/src/vulkan_texture.rs index 15ce5ec3..3d8d4ce5 100644 --- a/crates/yakui-vulkan/src/vulkan_texture.rs +++ b/crates/yakui-vulkan/src/vulkan_texture.rs @@ -183,7 +183,6 @@ fn get_format(yakui_format: yakui::paint::TextureFormat) -> vk::Format { yakui::paint::TextureFormat::Rgba8Srgb => vk::Format::R8G8B8A8_SRGB, yakui::paint::TextureFormat::Rgba8SrgbPremultiplied => vk::Format::R8G8B8A8_SRGB, yakui::paint::TextureFormat::R8 => vk::Format::R8_UNORM, - _ => panic!("Unsupported texture format: {yakui_format:?}"), } } diff --git a/crates/yakui-wgpu/src/lib.rs b/crates/yakui-wgpu/src/lib.rs index 8ef2a913..12760afa 100644 --- a/crates/yakui-wgpu/src/lib.rs +++ b/crates/yakui-wgpu/src/lib.rs @@ -268,7 +268,6 @@ impl YakuiWgpu { match command.pipeline { Pipeline::Main => render_pass.set_pipeline(main_pipeline), Pipeline::Text => render_pass.set_pipeline(text_pipeline), - _ => continue, } if command.clip != last_clip { diff --git a/crates/yakui-wgpu/src/texture.rs b/crates/yakui-wgpu/src/texture.rs index 93acc773..f3131e84 100644 --- a/crates/yakui-wgpu/src/texture.rs +++ b/crates/yakui-wgpu/src/texture.rs @@ -119,7 +119,6 @@ fn data_layout(format: TextureFormat, size: UVec2) -> wgpu::ImageDataLayout { bytes_per_row: Some(size.x), rows_per_image: Some(size.y), }, - _ => panic!("Unsupported texture format {format:?}"), } } @@ -128,7 +127,6 @@ fn wgpu_format(format: TextureFormat) -> wgpu::TextureFormat { TextureFormat::Rgba8Srgb => wgpu::TextureFormat::Rgba8UnormSrgb, TextureFormat::Rgba8SrgbPremultiplied => wgpu::TextureFormat::Rgba8UnormSrgb, TextureFormat::R8 => wgpu::TextureFormat::R8Unorm, - _ => panic!("Unsupported texture format {format:?}"), } } @@ -165,6 +163,5 @@ fn premultiply_alpha(texture: &Texture) -> Cow<'_, Texture> { } TextureFormat::Rgba8SrgbPremultiplied => Cow::Borrowed(texture), TextureFormat::R8 => Cow::Borrowed(texture), - _ => Cow::Borrowed(texture), } } diff --git a/crates/yakui-widgets/src/shapes.rs b/crates/yakui-widgets/src/shapes.rs index 8f5bdbec..e2b7c471 100644 --- a/crates/yakui-widgets/src/shapes.rs +++ b/crates/yakui-widgets/src/shapes.rs @@ -103,7 +103,6 @@ pub fn outline(output: &mut PaintDom, rect: Rect, w: f32, color: Color) { output.add_mesh(mesh); } -#[non_exhaustive] pub struct Circle { pub center: Vec2, pub radius: f32, @@ -163,7 +162,6 @@ const RECT_INDEX: [u16; 6] = [ 3, 0, 2, ]; -#[non_exhaustive] pub struct RoundedRectangle { pub rect: Rect, pub radius: f32, diff --git a/crates/yakui-widgets/src/style.rs b/crates/yakui-widgets/src/style.rs index 4e7476e5..86b6a92a 100644 --- a/crates/yakui-widgets/src/style.rs +++ b/crates/yakui-widgets/src/style.rs @@ -1,7 +1,6 @@ use yakui_core::geometry::Color; #[derive(Debug, Clone)] -#[non_exhaustive] pub struct TextStyle { pub font_size: f32, pub line_height_override: Option, diff --git a/crates/yakui-widgets/src/widgets/align.rs b/crates/yakui-widgets/src/widgets/align.rs index c4edec7b..1904135b 100644 --- a/crates/yakui-widgets/src/widgets/align.rs +++ b/crates/yakui-widgets/src/widgets/align.rs @@ -33,7 +33,6 @@ Align::new(yakui::Alignment::TOP_RIGHT).show(|| { ``` */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Align { pub alignment: Alignment, diff --git a/crates/yakui-widgets/src/widgets/button.rs b/crates/yakui-widgets/src/widgets/button.rs index 92dc85d4..eddc10bb 100644 --- a/crates/yakui-widgets/src/widgets/button.rs +++ b/crates/yakui-widgets/src/widgets/button.rs @@ -27,7 +27,6 @@ if yakui::button("Hello").clicked { ``` */ #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Button { pub text: Cow<'static, str>, @@ -41,7 +40,6 @@ pub struct Button { /// Contains styles that can vary based on the state of the button. #[derive(Debug, Clone)] -#[non_exhaustive] pub struct DynamicButtonStyle { pub text: TextStyle, pub fill: Color, diff --git a/crates/yakui-widgets/src/widgets/checkbox.rs b/crates/yakui-widgets/src/widgets/checkbox.rs index 54a74c38..09bc6b9f 100644 --- a/crates/yakui-widgets/src/widgets/checkbox.rs +++ b/crates/yakui-widgets/src/widgets/checkbox.rs @@ -24,7 +24,6 @@ value = yakui::checkbox(value).checked; ``` */ #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Checkbox { pub checked: bool, @@ -49,7 +48,6 @@ pub struct CheckboxWidget { } #[derive(Debug)] -#[non_exhaustive] pub struct CheckboxResponse { pub checked: bool, } diff --git a/crates/yakui-widgets/src/widgets/circle.rs b/crates/yakui-widgets/src/widgets/circle.rs index 210a2a5c..bccbbbff 100644 --- a/crates/yakui-widgets/src/widgets/circle.rs +++ b/crates/yakui-widgets/src/widgets/circle.rs @@ -11,7 +11,6 @@ A colored circle that can contain children. Responds with [CircleResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Circle { pub color: Color, diff --git a/crates/yakui-widgets/src/widgets/colored_box.rs b/crates/yakui-widgets/src/widgets/colored_box.rs index efd65cee..95ab3784 100644 --- a/crates/yakui-widgets/src/widgets/colored_box.rs +++ b/crates/yakui-widgets/src/widgets/colored_box.rs @@ -11,7 +11,6 @@ A colored box that can contain children. Responds with [ColoredBoxResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct ColoredBox { pub color: Color, diff --git a/crates/yakui-widgets/src/widgets/constrained_box.rs b/crates/yakui-widgets/src/widgets/constrained_box.rs index 57bda231..e504f345 100644 --- a/crates/yakui-widgets/src/widgets/constrained_box.rs +++ b/crates/yakui-widgets/src/widgets/constrained_box.rs @@ -10,7 +10,6 @@ A box that forces specific constraints onto its child. Responds with [ConstrainedBoxResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct ConstrainedBox { pub constraints: Constraints, diff --git a/crates/yakui-widgets/src/widgets/count_grid.rs b/crates/yakui-widgets/src/widgets/count_grid.rs index aa1275be..512f0181 100644 --- a/crates/yakui-widgets/src/widgets/count_grid.rs +++ b/crates/yakui-widgets/src/widgets/count_grid.rs @@ -27,7 +27,6 @@ Check the count_grid example to see it in action with different alignments and s Responds with [CountGridResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct CountGrid { pub direction: Direction, @@ -224,7 +223,6 @@ impl Widget for CountGridWidget { offset_main_global = match self.props.main_axis_size { MainAxisSize::Max => offset_main_global, MainAxisSize::Min => 0.0, - other => unimplemented!("MainAxisSize::{other:?}"), }; // only used in case the widget total cross is less than the minimum cross axis @@ -236,7 +234,6 @@ impl Widget for CountGridWidget { CrossAxisAlignment::End => { (direction.get_cross_axis(input.min) - max_total_cross_size).max(0.0) } - other => unimplemented!("CrossAxisAlignment::{other:?}"), }; // Apply alignment by offsetting all children @@ -255,7 +252,6 @@ impl Widget for CountGridWidget { CrossAxisAlignment::Start | CrossAxisAlignment::Stretch => 0.0, CrossAxisAlignment::Center => ((cell_cross_size - child_cross_size) / 2.0).max(0.0), CrossAxisAlignment::End => (cell_cross_size - child_cross_size).max(0.0), - other => unimplemented!("CrossAxisAlignment::{other:?}"), }; let child_main_size = direction.get_main_axis(layout.rect.size()); @@ -267,7 +263,6 @@ impl Widget for CountGridWidget { MainAxisAlignItems::Start | MainAxisAlignItems::Stretch => 0.0, MainAxisAlignItems::Center => ((cell_main_size - child_main_size) / 2.0).max(0.0), MainAxisAlignItems::End => (cell_main_size - child_main_size).max(0.0), - other => unimplemented!("MainAxisAlignItems::{other:?}"), }; let offset_pos = layout.rect.pos() @@ -290,7 +285,6 @@ impl Widget for CountGridWidget { let main_grid_size = match self.props.main_axis_size { MainAxisSize::Max => total_main_max, MainAxisSize::Min => total_main_size, - other => unimplemented!("MainAxisSize::{other:?}"), }; direction.vec2(main_grid_size, cross_grid_size) diff --git a/crates/yakui-widgets/src/widgets/cutout.rs b/crates/yakui-widgets/src/widgets/cutout.rs index 05aec1e7..d91c9e30 100644 --- a/crates/yakui-widgets/src/widgets/cutout.rs +++ b/crates/yakui-widgets/src/widgets/cutout.rs @@ -12,7 +12,6 @@ implementing a blur-behind effect. Responds with [CutOutResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct CutOut { pub image: Option, diff --git a/crates/yakui-widgets/src/widgets/divider.rs b/crates/yakui-widgets/src/widgets/divider.rs index ec14736e..738da8a2 100644 --- a/crates/yakui-widgets/src/widgets/divider.rs +++ b/crates/yakui-widgets/src/widgets/divider.rs @@ -7,7 +7,6 @@ use yakui_core::Response; /// /// Responds with [DividerResponse]. #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Divider { /// The color of the divider. diff --git a/crates/yakui-widgets/src/widgets/draggable.rs b/crates/yakui-widgets/src/widgets/draggable.rs index 6ef41ed6..dde6b0bf 100644 --- a/crates/yakui-widgets/src/widgets/draggable.rs +++ b/crates/yakui-widgets/src/widgets/draggable.rs @@ -7,7 +7,6 @@ use yakui_core::Response; use crate::util::widget_children; #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Draggable {} @@ -34,7 +33,6 @@ struct DragState { } #[derive(Debug)] -#[non_exhaustive] pub struct DraggableResponse { pub dragging: Option, } diff --git a/crates/yakui-widgets/src/widgets/flexible.rs b/crates/yakui-widgets/src/widgets/flexible.rs index 356c1690..f9ecbc23 100644 --- a/crates/yakui-widgets/src/widgets/flexible.rs +++ b/crates/yakui-widgets/src/widgets/flexible.rs @@ -22,7 +22,6 @@ yakui::flexible(2, || { ``` */ #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Flexible { pub flex: u32, diff --git a/crates/yakui-widgets/src/widgets/image.rs b/crates/yakui-widgets/src/widgets/image.rs index 099f1afc..16e7ff13 100644 --- a/crates/yakui-widgets/src/widgets/image.rs +++ b/crates/yakui-widgets/src/widgets/image.rs @@ -11,7 +11,6 @@ Displays an image. Responds with [ImageResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Image { pub image: Option, diff --git a/crates/yakui-widgets/src/widgets/layer.rs b/crates/yakui-widgets/src/widgets/layer.rs index cdb534f7..c88d74b6 100644 --- a/crates/yakui-widgets/src/widgets/layer.rs +++ b/crates/yakui-widgets/src/widgets/layer.rs @@ -12,7 +12,6 @@ In the future, this widget may be extended to support arbitrary transforms applied to layers. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Layer {} diff --git a/crates/yakui-widgets/src/widgets/list.rs b/crates/yakui-widgets/src/widgets/list.rs index 8cb9b935..867f7262 100644 --- a/crates/yakui-widgets/src/widgets/list.rs +++ b/crates/yakui-widgets/src/widgets/list.rs @@ -26,7 +26,6 @@ yakui::row(|| { ``` */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct List { pub direction: Direction, @@ -195,7 +194,6 @@ impl Widget for ListWidget { total_main_axis_size } } - other => unimplemented!("MainAxisSize::{other:?}"), }; let container_size = input.constrain(direction.vec2(main_axis_size, cross_size)); @@ -218,8 +216,6 @@ impl Widget for ListWidget { let child_layout = ctx.layout.get_mut(child_id).unwrap(); child_layout.rect.set_pos(anchor + offset); } - - other => unimplemented!("Flow::{other:?}"), } } @@ -254,7 +250,6 @@ impl Widget for ListWidget { (main_axis_size - total_main_axis_size) / (node.children.len() as f32 + 1.0); (between_space, between_space) } - other => unimplemented!("MainAxisAlignment::{other:?}"), }; between_space += self.props.item_spacing; @@ -275,7 +270,6 @@ impl Widget for ListWidget { CrossAxisAlignment::Start | CrossAxisAlignment::Stretch => 0.0, CrossAxisAlignment::Center => (cross_size - child_cross) / 2.0, CrossAxisAlignment::End => cross_size - child_cross, - other => unimplemented!("CrossAxisAlignment::{other:?}"), }; child_layout.rect.set_pos(direction.vec2(next_main, cross)); diff --git a/crates/yakui-widgets/src/widgets/max_width.rs b/crates/yakui-widgets/src/widgets/max_width.rs index 1ac9f7d9..a806ca39 100644 --- a/crates/yakui-widgets/src/widgets/max_width.rs +++ b/crates/yakui-widgets/src/widgets/max_width.rs @@ -10,7 +10,6 @@ A box that enforces a maximum width upon its children. Responds with [MaxWidthResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct MaxWidth { pub max_width: f32, diff --git a/crates/yakui-widgets/src/widgets/offset.rs b/crates/yakui-widgets/src/widgets/offset.rs index 75144eee..a535d021 100644 --- a/crates/yakui-widgets/src/widgets/offset.rs +++ b/crates/yakui-widgets/src/widgets/offset.rs @@ -8,7 +8,6 @@ use crate::util::widget_children; Offsets its child by the given number of logical pixels. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Offset { pub offset: Vec2, diff --git a/crates/yakui-widgets/src/widgets/opaque.rs b/crates/yakui-widgets/src/widgets/opaque.rs index 9ed8079f..86a64fde 100644 --- a/crates/yakui-widgets/src/widgets/opaque.rs +++ b/crates/yakui-widgets/src/widgets/opaque.rs @@ -10,7 +10,6 @@ used as a top-level element in windows, panels, pop-ups, and similar widgets that don't want mouse input to go through them. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Opaque {} diff --git a/crates/yakui-widgets/src/widgets/pad.rs b/crates/yakui-widgets/src/widgets/pad.rs index 6e70d552..86f38907 100644 --- a/crates/yakui-widgets/src/widgets/pad.rs +++ b/crates/yakui-widgets/src/widgets/pad.rs @@ -10,7 +10,6 @@ Applies padding around a single child widget. Responds with [PadResponse]. */ #[derive(Debug, Clone, Copy)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Pad { pub left: f32, diff --git a/crates/yakui-widgets/src/widgets/panel.rs b/crates/yakui-widgets/src/widgets/panel.rs index 92457aed..33426ae7 100644 --- a/crates/yakui-widgets/src/widgets/panel.rs +++ b/crates/yakui-widgets/src/widgets/panel.rs @@ -16,14 +16,12 @@ const _RESIZE_HANDLE_WIDTH: f32 = 6.0; /// for resizing: add a child widget for this purpose, or handle the hit /// detection and movement within a single widget? #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Panel { pub kind: PanelKind, } #[derive(Debug)] -#[non_exhaustive] pub enum PanelKind { Side, TopBottom, diff --git a/crates/yakui-widgets/src/widgets/reflow.rs b/crates/yakui-widgets/src/widgets/reflow.rs index 8e330f5c..f7c847c5 100644 --- a/crates/yakui-widgets/src/widgets/reflow.rs +++ b/crates/yakui-widgets/src/widgets/reflow.rs @@ -9,7 +9,6 @@ Changes the flow behavior a widget tree, allowing it to break out of list, grid, or table layouts. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Reflow { pub anchor: Alignment, diff --git a/crates/yakui-widgets/src/widgets/render_text.rs b/crates/yakui-widgets/src/widgets/render_text.rs index cb089509..54b16a3c 100644 --- a/crates/yakui-widgets/src/widgets/render_text.rs +++ b/crates/yakui-widgets/src/widgets/render_text.rs @@ -17,7 +17,6 @@ supports features like padding. Responds with [RenderTextResponse]. */ #[derive(Debug, Clone, Default)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct RenderText { pub text: String, diff --git a/crates/yakui-widgets/src/widgets/round_rect.rs b/crates/yakui-widgets/src/widgets/round_rect.rs index 074c5d6a..772173c1 100644 --- a/crates/yakui-widgets/src/widgets/round_rect.rs +++ b/crates/yakui-widgets/src/widgets/round_rect.rs @@ -11,7 +11,6 @@ A colored box with rounded corners that can contain children. Responds with [RoundRectResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct RoundRect { pub radius: f32, diff --git a/crates/yakui-widgets/src/widgets/scrollable.rs b/crates/yakui-widgets/src/widgets/scrollable.rs index 167960b9..04d97312 100644 --- a/crates/yakui-widgets/src/widgets/scrollable.rs +++ b/crates/yakui-widgets/src/widgets/scrollable.rs @@ -8,7 +8,6 @@ use yakui_core::Response; use crate::util::widget_children; #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Scrollable { pub direction: Option, @@ -36,7 +35,6 @@ pub enum ScrollDirection { } #[derive(Debug)] -#[non_exhaustive] pub struct ScrollableWidget { props: Scrollable, scroll_position: Cell, diff --git a/crates/yakui-widgets/src/widgets/slider.rs b/crates/yakui-widgets/src/widgets/slider.rs index d81d78a1..2feb89d6 100644 --- a/crates/yakui-widgets/src/widgets/slider.rs +++ b/crates/yakui-widgets/src/widgets/slider.rs @@ -17,7 +17,6 @@ const KNOB_SIZE: f32 = 24.0; const TOTAL_HEIGHT: f32 = KNOB_SIZE * 1.5; #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Slider { pub value: f64, @@ -42,7 +41,6 @@ impl Slider { } #[derive(Debug)] -#[non_exhaustive] pub struct SliderResponse { pub value: Option, } diff --git a/crates/yakui-widgets/src/widgets/spacer.rs b/crates/yakui-widgets/src/widgets/spacer.rs index 8516769c..f21824da 100644 --- a/crates/yakui-widgets/src/widgets/spacer.rs +++ b/crates/yakui-widgets/src/widgets/spacer.rs @@ -10,7 +10,6 @@ use crate::util::widget; /// /// Responds with [SpacerResponse]. #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Spacer { pub flex: u32, diff --git a/crates/yakui-widgets/src/widgets/stack.rs b/crates/yakui-widgets/src/widgets/stack.rs index 360e7388..c2a12eeb 100644 --- a/crates/yakui-widgets/src/widgets/stack.rs +++ b/crates/yakui-widgets/src/widgets/stack.rs @@ -27,7 +27,6 @@ yakui::column(|| { ``` */ #[derive(Debug, Default)] -#[non_exhaustive] pub struct Stack {} impl Stack { diff --git a/crates/yakui-widgets/src/widgets/text.rs b/crates/yakui-widgets/src/widgets/text.rs index fa443007..38fd95cf 100644 --- a/crates/yakui-widgets/src/widgets/text.rs +++ b/crates/yakui-widgets/src/widgets/text.rs @@ -28,7 +28,6 @@ text.show(); ``` */ #[derive(Debug)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct Text { pub text: Cow<'static, str>, diff --git a/crates/yakui-widgets/src/widgets/textbox.rs b/crates/yakui-widgets/src/widgets/textbox.rs index c5838a9d..3d8911ef 100644 --- a/crates/yakui-widgets/src/widgets/textbox.rs +++ b/crates/yakui-widgets/src/widgets/textbox.rs @@ -23,7 +23,6 @@ Text that can be edited. Responds with [TextBoxResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct TextBox { pub text: String, diff --git a/crates/yakui-widgets/src/widgets/unconstrained_box.rs b/crates/yakui-widgets/src/widgets/unconstrained_box.rs index 01a42980..1f6d60ca 100644 --- a/crates/yakui-widgets/src/widgets/unconstrained_box.rs +++ b/crates/yakui-widgets/src/widgets/unconstrained_box.rs @@ -10,7 +10,6 @@ A box that renders its child with one or both of its constraint axes ignored. Responds with [UnconstrainedBoxResponse]. */ #[derive(Debug, Clone)] -#[non_exhaustive] #[must_use = "yakui widgets do nothing if you don't `show` them"] pub struct UnconstrainedBox { pub constrain_x: bool, diff --git a/crates/yakui-winit/src/lib.rs b/crates/yakui-winit/src/lib.rs index adadd1b4..0e61db40 100644 --- a/crates/yakui-winit/src/lib.rs +++ b/crates/yakui-winit/src/lib.rs @@ -11,7 +11,6 @@ use yakui_core::input::MouseButton; pub use self::keys::{from_winit_key, from_winit_modifiers}; -#[non_exhaustive] pub struct YakuiWinit { auto_scale: bool, auto_viewport: bool,