chore: more clippy rules 2 (#4057)
The only file to watch is the cargo.toml All the others come from just fix + a few manual small fix The set of rules have been taken from the list of clippy rules arbitrarily while trying to optimise the learning and style of the code while limiting the loss of productivity
This commit is contained in:
@@ -511,7 +511,7 @@ mod tests {
|
||||
.subsequent_indent(Line::from(" "));
|
||||
|
||||
let lines = [Line::from("hello world"), Line::from("foo bar baz")];
|
||||
let out = word_wrap_lines_borrowed(lines.iter().collect::<Vec<_>>(), opts);
|
||||
let out = word_wrap_lines_borrowed(lines.iter(), opts);
|
||||
|
||||
let rendered: Vec<String> = out.iter().map(concat_line).collect();
|
||||
assert!(rendered.first().unwrap().starts_with("- "));
|
||||
@@ -523,7 +523,7 @@ mod tests {
|
||||
#[test]
|
||||
fn wrap_lines_borrowed_without_indents_is_concat_of_single_wraps() {
|
||||
let lines = [Line::from("hello"), Line::from("world!")];
|
||||
let out = word_wrap_lines_borrowed(lines.iter().collect::<Vec<_>>(), 10);
|
||||
let out = word_wrap_lines_borrowed(lines.iter(), 10);
|
||||
let rendered: Vec<String> = out.iter().map(concat_line).collect();
|
||||
assert_eq!(rendered, vec!["hello", "world!"]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user