core: what rustfmt actually wanted
Three from the checker's own diff. Two are the rule I had guessed at: when a call overflows and its last argument is a closure, rustfmt keeps the earlier arguments on the line and expands the closure into a block, rather than putting every argument on its own line. The third is a stray double blank line before the test module.
This commit is contained in:
@@ -396,7 +396,10 @@ mod tests {
|
||||
assert_eq!(append_item("a note", "milk", false), "a note\n\n- [ ] milk");
|
||||
// Nothing between consecutive items.
|
||||
let one = "a note\n\n- [ ] milk";
|
||||
assert_eq!(append_item(one, "eggs", false), format!("{one}\n- [ ] eggs"));
|
||||
assert_eq!(
|
||||
append_item(one, "eggs", false),
|
||||
format!("{one}\n- [ ] eggs")
|
||||
);
|
||||
// A list-only note starts at the first line.
|
||||
assert_eq!(append_item("", "milk", false), "- [ ] milk");
|
||||
assert_eq!(append_item("\n\n", "milk", false), "- [ ] milk");
|
||||
|
||||
Reference in New Issue
Block a user