diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-30 09:45:16 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-30 09:45:16 +0100 |
commit | e87cba85efe966f51e9ba68401187731319ba7c7 (patch) | |
tree | 65699e6f3a876d3aa4ac62576d76e8f518a21d62 /crates/ra_ssr/src | |
parent | d13ded6cbc8b835807f08606db90bedf18643154 (diff) | |
parent | ef49bbeec430586b847a0ef84264b7afaf36112a (diff) |
Merge #5132
5132: Fix some typos r=matklad a=davidlattimore
Co-authored-by: David Lattimore <[email protected]>
Diffstat (limited to 'crates/ra_ssr/src')
-rw-r--r-- | crates/ra_ssr/src/matching.rs | 2 | ||||
-rw-r--r-- | crates/ra_ssr/src/parsing.rs | 2 | ||||
-rw-r--r-- | crates/ra_ssr/src/tests.rs | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ssr/src/matching.rs b/crates/ra_ssr/src/matching.rs index bb87bda43..54413a151 100644 --- a/crates/ra_ssr/src/matching.rs +++ b/crates/ra_ssr/src/matching.rs | |||
@@ -225,7 +225,7 @@ impl<'db, 'sema> MatchState<'db, 'sema> { | |||
225 | match self.next_non_trivial(&mut code_it) { | 225 | match self.next_non_trivial(&mut code_it) { |
226 | None => { | 226 | None => { |
227 | if let Some(p) = pattern_it.next() { | 227 | if let Some(p) = pattern_it.next() { |
228 | fail_match!("Part of the pattern was unmached: {:?}", p); | 228 | fail_match!("Part of the pattern was unmatched: {:?}", p); |
229 | } | 229 | } |
230 | return Ok(()); | 230 | return Ok(()); |
231 | } | 231 | } |
diff --git a/crates/ra_ssr/src/parsing.rs b/crates/ra_ssr/src/parsing.rs index 1ae166d19..04d46bd32 100644 --- a/crates/ra_ssr/src/parsing.rs +++ b/crates/ra_ssr/src/parsing.rs | |||
@@ -55,7 +55,7 @@ impl FromStr for SsrRule { | |||
55 | let pattern = it.next().expect("at least empty string").trim(); | 55 | let pattern = it.next().expect("at least empty string").trim(); |
56 | let template = it | 56 | let template = it |
57 | .next() | 57 | .next() |
58 | .ok_or_else(|| SsrError("Cannot find delemiter `==>>`".into()))? | 58 | .ok_or_else(|| SsrError("Cannot find delimiter `==>>`".into()))? |
59 | .trim() | 59 | .trim() |
60 | .to_string(); | 60 | .to_string(); |
61 | if it.next().is_some() { | 61 | if it.next().is_some() { |
diff --git a/crates/ra_ssr/src/tests.rs b/crates/ra_ssr/src/tests.rs index 8be60c293..57b2f50b2 100644 --- a/crates/ra_ssr/src/tests.rs +++ b/crates/ra_ssr/src/tests.rs | |||
@@ -152,12 +152,12 @@ fn parse_error_text(query: &str) -> String { | |||
152 | 152 | ||
153 | #[test] | 153 | #[test] |
154 | fn parser_empty_query() { | 154 | fn parser_empty_query() { |
155 | assert_eq!(parse_error_text(""), "Parse error: Cannot find delemiter `==>>`"); | 155 | assert_eq!(parse_error_text(""), "Parse error: Cannot find delimiter `==>>`"); |
156 | } | 156 | } |
157 | 157 | ||
158 | #[test] | 158 | #[test] |
159 | fn parser_no_delimiter() { | 159 | fn parser_no_delimiter() { |
160 | assert_eq!(parse_error_text("foo()"), "Parse error: Cannot find delemiter `==>>`"); | 160 | assert_eq!(parse_error_text("foo()"), "Parse error: Cannot find delimiter `==>>`"); |
161 | } | 161 | } |
162 | 162 | ||
163 | #[test] | 163 | #[test] |
@@ -227,7 +227,7 @@ fn assert_ssr_transforms(rules: &[&str], input: &str, result: &str) { | |||
227 | let mut after = db.file_text(file_id).to_string(); | 227 | let mut after = db.file_text(file_id).to_string(); |
228 | edits.apply(&mut after); | 228 | edits.apply(&mut after); |
229 | // Likewise, we need to make sure that whatever transformations fixture parsing applies, | 229 | // Likewise, we need to make sure that whatever transformations fixture parsing applies, |
230 | // also get appplied to our expected result. | 230 | // also get applied to our expected result. |
231 | let result = normalize_code(result); | 231 | let result = normalize_code(result); |
232 | assert_eq!(after, result); | 232 | assert_eq!(after, result); |
233 | } else { | 233 | } else { |