In the following example, the first long method call chain is kept at the outer indentation level, while the second is indented by one:
fn very_very_very_very_very_long_fun_name(x: i32) -> Vec<i32> {
vec![x]
}
fn main() {
let very_very_very_very_very_very_very_very_very_long_var_name = 13;
let all = very_very_very_very_very_long_fun_name(
very_very_very_very_very_very_very_very_very_long_var_name,
)
.iter()
.map(|x| x + very_very_very_very_very_very_long_var_name);
let more = 13;
let other = vec![1, 2, 3]
.iter()
.map(|x| x + very_very_very_very_very_very_long_var_name);
}
I think the first chain is formatted quite badly; everything that's part of let all should be indented by one to indicate that it is part of the same statement.
In the following example, the first long method call chain is kept at the outer indentation level, while the second is indented by one:
I think the first chain is formatted quite badly; everything that's part of
let allshould be indented by one to indicate that it is part of the same statement.