mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
clippy
This commit is contained in:
parent
eaa0824347
commit
e9e4e710e2
2 changed files with 8 additions and 10 deletions
|
@ -132,7 +132,7 @@ pub fn expect_success(input: &str, expected: &str) {
|
|||
// The state.rs tests do that!
|
||||
let mut iter = out.stdout.lines().rev();
|
||||
let line = iter.next().unwrap();
|
||||
let comment_index = line.rfind("#").unwrap_or_else(|| line.len());
|
||||
let comment_index = line.rfind('#').unwrap_or(line.len());
|
||||
let line_without_comment = line[0..comment_index].trim_end();
|
||||
|
||||
// Sometimes the "# val1" wraps around to its own line; if this happens,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue