From 915cece734460ddd4af2e4fd47a41b06e9ec240e Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Sat, 25 Sep 2021 15:39:54 +0200 Subject: cleanup some lints --- src/ui/stateful_paragraph.rs | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'src/ui') 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> { -- cgit v1.2.3