From 6fc6d23872954aae6cebd59e736c0e1b76c4e7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Miguel?= <36349314+vrmiguel@users.noreply.github.com> Date: Sat, 15 Jan 2022 16:14:23 -0300 Subject: [PATCH] fix: missing `#[must_use]` attribute on a method returning `Self` (#243) --- src/error.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/error.rs b/src/error.rs index b8a7ddb..8ed8fe6 100644 --- a/src/error.rs +++ b/src/error.rs @@ -86,17 +86,20 @@ impl Display for FinalError { impl FinalError { /// Only constructor + #[must_use] pub fn with_title(title: impl ToString) -> Self { Self { title: title.to_string(), details: vec![], hints: vec![] } } /// Add one detail line, can have multiple + #[must_use] pub fn detail(mut self, detail: impl ToString) -> Self { self.details.push(detail.to_string()); self } /// Add one hint line, can have multiple + #[must_use] pub fn hint(mut self, hint: impl ToString) -> Self { self.hints.push(hint.to_string()); self