mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-14 00:47:18 +00:00
Merge #2076
2076: use correct spacing for enum pattern r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
2f7d1f10c1
4 changed files with 6 additions and 6 deletions
|
@ -26,7 +26,7 @@ use crate::{Assist, AssistCtx, AssistId};
|
|||
//
|
||||
// fn handle(action: Action) {
|
||||
// match action {
|
||||
// Action::Move{ distance } => (),
|
||||
// Action::Move { distance } => (),
|
||||
// Action::Stop => (),
|
||||
// }
|
||||
// }
|
||||
|
@ -154,7 +154,7 @@ mod tests {
|
|||
A::Bs => (),
|
||||
A::Cs(_) => (),
|
||||
A::Ds(_, _) => (),
|
||||
A::Es{ x, y } => (),
|
||||
A::Es { x, y } => (),
|
||||
}
|
||||
}
|
||||
"#,
|
||||
|
@ -207,7 +207,7 @@ mod tests {
|
|||
|
||||
fn foo(a: &mut A) {
|
||||
match <|>a {
|
||||
A::Es{ x, y } => (),
|
||||
A::Es { x, y } => (),
|
||||
}
|
||||
}
|
||||
"#,
|
||||
|
|
|
@ -196,7 +196,7 @@ enum Action { Move { distance: u32 }, Stop }
|
|||
|
||||
fn handle(action: Action) {
|
||||
match action {
|
||||
Action::Move{ distance } => (),
|
||||
Action::Move { distance } => (),
|
||||
Action::Stop => (),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ pub fn tuple_struct_pat(
|
|||
|
||||
pub fn record_pat(path: ast::Path, pats: impl Iterator<Item = ast::Pat>) -> ast::RecordPat {
|
||||
let pats_str = pats.map(|p| p.syntax().to_string()).join(", ");
|
||||
return from_text(&format!("{}{{ {} }}", path.syntax(), pats_str));
|
||||
return from_text(&format!("{} {{ {} }}", path.syntax(), pats_str));
|
||||
|
||||
fn from_text(text: &str) -> ast::RecordPat {
|
||||
ast_from_text(&format!("fn f({}: ())", text))
|
||||
|
|
|
@ -191,7 +191,7 @@ enum Action { Move { distance: u32 }, Stop }
|
|||
|
||||
fn handle(action: Action) {
|
||||
match action {
|
||||
Action::Move{ distance } => (),
|
||||
Action::Move { distance } => (),
|
||||
Action::Stop => (),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue