diff --git a/macros/src/stack.rs b/macros/src/stack.rs index 6856815..9bb7161 100644 --- a/macros/src/stack.rs +++ b/macros/src/stack.rs @@ -35,6 +35,7 @@ pub(crate) fn generate_stack_remove_children() -> syn::Result, diff --git a/tlib/src/types.rs b/tlib/src/types.rs index b42cabc..76715ae 100644 --- a/tlib/src/types.rs +++ b/tlib/src/types.rs @@ -353,7 +353,7 @@ impl StaticType for String { fn dyn_bytes_len(&self) -> usize { // An extra '\0' - self.bytes().len() + 1 + self.len() + 1 } } @@ -368,7 +368,7 @@ impl StaticType for &str { fn dyn_bytes_len(&self) -> usize { // An extra '\0' - self.bytes().len() + 1 + self.len() + 1 } } diff --git a/tmui/src/icons/svg_icon.rs b/tmui/src/icons/svg_icon.rs index 804ac00..7436ffb 100644 --- a/tmui/src/icons/svg_icon.rs +++ b/tmui/src/icons/svg_icon.rs @@ -75,6 +75,11 @@ impl SvgIcon { pub fn load_bytes(&mut self, data: &[u8]) { self.build_from_data(data); } + + #[inline] + pub fn get_view_size(&self) -> Size { + self.view_size + } } impl SvgIcon { diff --git a/tmui/src/primitive/message.rs b/tmui/src/primitive/message.rs index 5dadb6a..3f8cf69 100644 --- a/tmui/src/primitive/message.rs +++ b/tmui/src/primitive/message.rs @@ -11,6 +11,7 @@ use tlib::{ winit::window::WindowId, }; +#[allow(clippy::large_enum_variant)] pub(crate) enum Message { /// VSync signal to redraw the window VSync(WindowId, Instant), diff --git a/tmui/src/tooltip.rs b/tmui/src/tooltip.rs index 79092d8..1521c0e 100644 --- a/tmui/src/tooltip.rs +++ b/tmui/src/tooltip.rs @@ -124,6 +124,7 @@ impl Tooltip { } } +#[allow(clippy::large_enum_variant)] pub(crate) enum TooltipStrat<'a> { Show(&'a str, Point, OptionSize, Option), Hide, diff --git a/tmui/src/views/list_view/list_store.rs b/tmui/src/views/list_view/list_store.rs index fc492dc..3e5b31b 100644 --- a/tmui/src/views/list_view/list_store.rs +++ b/tmui/src/views/list_view/list_store.rs @@ -396,7 +396,7 @@ impl ListStore { /// @param `internal` /// - true: The view scrolling triggered internally in ListView - /// requires notifying the scroll bar to change the value. + /// requires notifying the scroll bar to change the value. /// /// @return `true` if scroll value has updated, should update the image. #[inline] diff --git a/tmui/src/views/tree_view/tree_store.rs b/tmui/src/views/tree_view/tree_store.rs index 63ab7b3..e8c4d39 100644 --- a/tmui/src/views/tree_view/tree_store.rs +++ b/tmui/src/views/tree_view/tree_store.rs @@ -557,7 +557,7 @@ impl TreeStore { /// @param `internal` /// - true: The view scrolling triggered internally in TreeView - /// requires notifying the scroll bar to change the value. + /// requires notifying the scroll bar to change the value. /// /// @return `true` if scroll value has updated, should update the image. #[inline]