aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_ide/src/ssr.rs2
-rw-r--r--crates/ra_ssr/src/matching.rs2
-rw-r--r--crates/ra_ssr/src/parsing.rs2
-rw-r--r--crates/ra_ssr/src/tests.rs6
-rw-r--r--crates/rust-analyzer/src/bin/args.rs2
5 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_ide/src/ssr.rs b/crates/ra_ide/src/ssr.rs
index 6cb96608b..9f8e540c0 100644
--- a/crates/ra_ide/src/ssr.rs
+++ b/crates/ra_ide/src/ssr.rs
@@ -4,7 +4,7 @@ use ra_ide_db::{symbol_index::SymbolsDatabase, RootDatabase};
4use crate::SourceFileEdit; 4use crate::SourceFileEdit;
5use ra_ssr::{MatchFinder, SsrError, SsrRule}; 5use ra_ssr::{MatchFinder, SsrError, SsrRule};
6 6
7// Feature: Structural Seach and Replace 7// Feature: Structural Search and Replace
8// 8//
9// Search and replace with named wildcards that will match any expression, type, path, pattern or item. 9// Search and replace with named wildcards that will match any expression, type, path, pattern or item.
10// The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`. 10// The syntax for a structural search replace command is `<search_pattern> ==>> <replace_pattern>`.
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]
154fn parser_empty_query() { 154fn 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]
159fn parser_no_delimiter() { 159fn 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 {
diff --git a/crates/rust-analyzer/src/bin/args.rs b/crates/rust-analyzer/src/bin/args.rs
index 3f0bb3865..cf1108e12 100644
--- a/crates/rust-analyzer/src/bin/args.rs
+++ b/crates/rust-analyzer/src/bin/args.rs
@@ -98,7 +98,7 @@ USAGE:
98 rust-analyzer parse [FLAGS] 98 rust-analyzer parse [FLAGS]
99 99
100FLAGS: 100FLAGS:
101 -h, --help Prints help inforamtion 101 -h, --help Prints help information
102 --no-dump" 102 --no-dump"
103 ); 103 );
104 return Ok(Err(HelpPrinted)); 104 return Ok(Err(HelpPrinted));