Hi,
Does rustfmt work with long string literals used with macros (e.g. format!) ? The example shows that it does not, i.e. no effect at all . Is that expected?
fn print_long_string(s: String) -> usize {
println!("my string: {}", &s);
s.len()
}
fn main() {
let length = print_long_string(format!("This is a long string test for Rust, with field 1 {} field 2 {} field 3 {} field 4 {} field 5 {} field 6 {}", 1, 2, 3, 4, 5, 6));
println!("length: {}", length);
}
Here is the playground link.
Rustfmt seems not reformat the long line in the above code. I found this old issue closed, but not sure what to expect now (Rust 1.50).