From 045d3e3ac736b428e6ba1d683fc750d187ef3e7b Mon Sep 17 00:00:00 2001 From: asymmetric Date: Sun, 8 Oct 2023 08:28:56 +0000 Subject: [PATCH] remove unneeded variable assignment Co-authored-by: Silvan Mosberger --- src/commonmark.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/commonmark.rs b/src/commonmark.rs index 6a158e0..78a13cf 100644 --- a/src/commonmark.rs +++ b/src/commonmark.rs @@ -91,14 +91,12 @@ impl Argument { /// : first line /// every other line fn handle_indentation(raw: &str) -> String { - let result: String = match raw.split_once('\n') { + match raw.split_once('\n') { Some((first, rest)) => { format!("{}\n{}", first, textwrap::indent(rest, " ")) } None => raw.into(), - }; - - result + } } /// Represents a single manual section describing a library function.