Skip to content

Commit c933ace

Browse files
authored
style: Remove unneeded return statement (#86)
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) | ```
1 parent 9fcd0a5 commit c933ace

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ fn unquote_block_string(src: &str) -> Result<String, Error<Token<'_>, Token<'_>>
223223
result.push_str(&line);
224224
}
225225
}
226-
return Ok(result);
226+
Ok(result)
227227
}
228228

229229
fn unquote_string(s: &str) -> Result<String, Error<Token, Token>> {
@@ -476,6 +476,6 @@ mod tests {
476476
}
477477

478478
fn triple_quote(input: &str) -> String {
479-
return format!("\"\"\"{}\"\"\"", input);
479+
format!("\"\"\"{}\"\"\"", input)
480480
}
481481
}

0 commit comments

Comments
 (0)