Running rustfmt on rust-lang/rust and other rust-lang repositories

I don’t think this is “community consensus”.

-Ok(s) => if s == "true" { "y" } else { "n" },
+Ok(s) => {
+	if s == "true" {
+		"y"
+	} else {
+		"n"
+	}
+}

It’s just rustfmt not respecting line lengths.

Remember how the conditional operator “cond ? if_yes : if_no” was always rejected because "if is already an expression"? With formatting like this that just sounds like mockery in retrospect.

12 Likes