Closed
Description
Input
tokio::select! {
result = reader => {
match result {
Ok(v) => {
eprintln!(
"message: {}",
v
);
},
Err(_) => {
eprintln!(
"error: {}",
e
);
},
}
},
_ = writer => {
// Comment
eprintln!(
"completed: {}",
some_other_field
);
}
}
This is basically what company-mode
gives us. I edited it slightly from the actual code but preserved the indentation.
Output
tokio::select! {
result = reader => {
match result {
Ok(v) => {
eprintln!(
"message: {}",
v
);
},
Err(e) => {
eprintln!(
"error: {}",
e
);
}
}
},
_ = writer => {
// Comment
eprintln!(
"completed: {}",
some_other_field
);
}
}
Expected output
Something that resembles the input.
Meta
- rustfmt version:
rustfmt 1.4.30-nightly (acd9486 2020-12-20)
- From where did you install rustfmt?: rustup