aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-10-26 16:04:26 +0100
committerGitHub <[email protected]>2019-10-26 16:04:26 +0100
commit2f7d1f10c1614d9448604da5c105b75c43cc6f2b (patch)
tree4ef8c23e7c60e55a74e81a880ae78b8c5bb55288
parent65e3fc8e772219bd41e182e424c928700788032a (diff)
parent4ef9b8d17a75d3f68951f506ad390e1367c1b2ad (diff)
Merge #2076
2076: use correct spacing for enum pattern r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r--crates/ra_assists/src/assists/fill_match_arms.rs6
-rw-r--r--crates/ra_assists/src/doc_tests/generated.rs2
-rw-r--r--crates/ra_syntax/src/ast/make.rs2
-rw-r--r--docs/user/assists.md2
4 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_assists/src/assists/fill_match_arms.rs b/crates/ra_assists/src/assists/fill_match_arms.rs
index 13b98d033..b6166f947 100644
--- a/crates/ra_assists/src/assists/fill_match_arms.rs
+++ b/crates/ra_assists/src/assists/fill_match_arms.rs
@@ -26,7 +26,7 @@ use crate::{Assist, AssistCtx, AssistId};
26// 26//
27// fn handle(action: Action) { 27// fn handle(action: Action) {
28// match action { 28// match action {
29// Action::Move{ distance } => (), 29// Action::Move { distance } => (),
30// Action::Stop => (), 30// Action::Stop => (),
31// } 31// }
32// } 32// }
@@ -154,7 +154,7 @@ mod tests {
154 A::Bs => (), 154 A::Bs => (),
155 A::Cs(_) => (), 155 A::Cs(_) => (),
156 A::Ds(_, _) => (), 156 A::Ds(_, _) => (),
157 A::Es{ x, y } => (), 157 A::Es { x, y } => (),
158 } 158 }
159 } 159 }
160 "#, 160 "#,
@@ -207,7 +207,7 @@ mod tests {
207 207
208 fn foo(a: &mut A) { 208 fn foo(a: &mut A) {
209 match <|>a { 209 match <|>a {
210 A::Es{ x, y } => (), 210 A::Es { x, y } => (),
211 } 211 }
212 } 212 }
213 "#, 213 "#,
diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs
index 2f36c3baa..43fa159d7 100644
--- a/crates/ra_assists/src/doc_tests/generated.rs
+++ b/crates/ra_assists/src/doc_tests/generated.rs
@@ -196,7 +196,7 @@ enum Action { Move { distance: u32 }, Stop }
196 196
197fn handle(action: Action) { 197fn handle(action: Action) {
198 match action { 198 match action {
199 Action::Move{ distance } => (), 199 Action::Move { distance } => (),
200 Action::Stop => (), 200 Action::Stop => (),
201 } 201 }
202} 202}
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs
index 00422ea91..76dad9155 100644
--- a/crates/ra_syntax/src/ast/make.rs
+++ b/crates/ra_syntax/src/ast/make.rs
@@ -77,7 +77,7 @@ pub fn tuple_struct_pat(
77 77
78pub fn record_pat(path: ast::Path, pats: impl Iterator<Item = ast::Pat>) -> ast::RecordPat { 78pub fn record_pat(path: ast::Path, pats: impl Iterator<Item = ast::Pat>) -> ast::RecordPat {
79 let pats_str = pats.map(|p| p.syntax().to_string()).join(", "); 79 let pats_str = pats.map(|p| p.syntax().to_string()).join(", ");
80 return from_text(&format!("{}{{ {} }}", path.syntax(), pats_str)); 80 return from_text(&format!("{} {{ {} }}", path.syntax(), pats_str));
81 81
82 fn from_text(text: &str) -> ast::RecordPat { 82 fn from_text(text: &str) -> ast::RecordPat {
83 ast_from_text(&format!("fn f({}: ())", text)) 83 ast_from_text(&format!("fn f({}: ())", text))
diff --git a/docs/user/assists.md b/docs/user/assists.md
index 7a64c80ad..603b29c66 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -191,7 +191,7 @@ enum Action { Move { distance: u32 }, Stop }
191 191
192fn handle(action: Action) { 192fn handle(action: Action) {
193 match action { 193 match action {
194 Action::Move{ distance } => (), 194 Action::Move { distance } => (),
195 Action::Stop => (), 195 Action::Stop => (),
196 } 196 }
197} 197}