From d228f439f175a5b7c9dfe275b05b79cdee32faf4 Mon Sep 17 00:00:00 2001 From: EdJoPaTo Date: Sat, 26 Feb 2022 13:56:34 +0100 Subject: [PATCH] refactor(lint): specify must_use more often --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 00c0df9..0283db1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -124,6 +124,7 @@ impl<'a> TreeItem<'a> { self.text.height() } + #[must_use] pub const fn style(mut self, style: Style) -> Self { self.style = style; self @@ -163,26 +164,31 @@ impl<'a> Tree<'a> { } #[allow(clippy::missing_const_for_fn)] + #[must_use] pub fn block(mut self, block: Block<'a>) -> Self { self.block = Some(block); self } + #[must_use] pub const fn style(mut self, style: Style) -> Self { self.style = style; self } + #[must_use] pub const fn highlight_symbol(mut self, highlight_symbol: &'a str) -> Self { self.highlight_symbol = Some(highlight_symbol); self } + #[must_use] pub const fn highlight_style(mut self, style: Style) -> Self { self.highlight_style = style; self } + #[must_use] pub const fn start_corner(mut self, corner: Corner) -> Self { self.start_corner = corner; self