From 3090c129851d6ee937c4407a7c7830cf6cf5b3f6 Mon Sep 17 00:00:00 2001 From: Casper Meijn Date: Thu, 19 Dec 2024 13:45:34 +0100 Subject: [PATCH] style: Remove unneeded `return` statement This solves clippy warnings like this: ``` error: unneeded `return` statement --> src/common.rs:226:5 | 226 | return Ok(result); | ^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `-D clippy::needless-return` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_return)]` help: remove `return` | 226 - return Ok(result); 226 + Ok(result) | ``` --- src/common.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common.rs b/src/common.rs index 3261df9..5ae0aff 100644 --- a/src/common.rs +++ b/src/common.rs @@ -223,7 +223,7 @@ fn unquote_block_string(src: &str) -> Result, Token<'_>> result.push_str(&line); } } - return Ok(result); + Ok(result) } fn unquote_string(s: &str) -> Result> { @@ -476,6 +476,6 @@ mod tests { } fn triple_quote(input: &str) -> String { - return format!("\"\"\"{}\"\"\"", input); + format!("\"\"\"{}\"\"\"", input) } }