//
// fn handle(action: Action) {
// match action {
-// Action::Move{ distance } => (),
+// Action::Move { distance } => (),
// Action::Stop => (),
// }
// }
A::Bs => (),
A::Cs(_) => (),
A::Ds(_, _) => (),
- A::Es{ x, y } => (),
+ A::Es { x, y } => (),
}
}
"#,
fn foo(a: &mut A) {
match <|>a {
- A::Es{ x, y } => (),
+ A::Es { x, y } => (),
}
}
"#,
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))
fn handle(action: Action) {
match action {
- Action::Move{ distance } => (),
+ Action::Move { distance } => (),
Action::Stop => (),
}
}