diff options
author | Stephan Dilly <dilly.stephan@gmail.com> | 2021-09-25 15:39:54 +0200 |
---|---|---|
committer | Stephan Dilly <dilly.stephan@gmail.com> | 2021-09-25 15:39:54 +0200 |
commit | 915cece734460ddd4af2e4fd47a41b06e9ec240e (patch) | |
tree | 3a1b237e81d3151dbac9e317c2e86bbd13b9513d | |
parent | d541d0d9f85a3bbbfe834e9a6388dc4a5c81c196 (diff) |
cleanup some lints
-rw-r--r-- | src/components/options_popup.rs | 2 | ||||
-rw-r--r-- | src/ui/stateful_paragraph.rs | 25 |
2 files changed, 10 insertions, 17 deletions
diff --git a/src/components/options_popup.rs b/src/components/options_popup.rs index 31a263e2..38897cd2 100644 --- a/src/components/options_popup.rs +++ b/src/components/options_popup.rs @@ -1,4 +1,4 @@ -#![allow(dead_code)] + use std::{cell::RefCell, rc::Rc}; diff --git a/src/ui/stateful_paragraph.rs b/src/ui/stateful_paragraph.rs index 49b7a22f..43bdeb80 100644 --- a/src/ui/stateful_paragraph.rs +++ b/src/ui/stateful_paragraph.rs @@ -1,4 +1,3 @@ -#![allow(dead_code)] use easy_cast::Cast; use std::iter; @@ -49,12 +48,6 @@ pub struct ScrollPos { pub y: u16, } -impl ScrollPos { - pub const fn new(x: u16, y: u16) -> Self { - Self { x, y } - } -} - #[derive(Debug, Copy, Clone, Default)] pub struct ParagraphState { /// Scroll @@ -103,20 +96,20 @@ impl<'a> StatefulParagraph<'a> { self } - pub const fn style(mut self, style: Style) -> Self { - self.style = style; - self - } - pub const fn wrap(mut self, wrap: Wrap) -> Self { self.wrap = Some(wrap); self } - pub const fn alignment(mut self, alignment: Alignment) -> Self { - self.alignment = alignment; - self - } + // pub const fn style(mut self, style: Style) -> Self { + // self.style = style; + // self + // } + + // pub const fn alignment(mut self, alignment: Alignment) -> Self { + // self.alignment = alignment; + // self + // } } impl<'a> StatefulWidget for StatefulParagraph<'a> { |