From ef49bbeec430586b847a0ef84264b7afaf36112a Mon Sep 17 00:00:00 2001 From: David Lattimore Date: Tue, 30 Jun 2020 10:43:37 +1000 Subject: [PATCH] Fix some typos --- crates/ra_ide/src/ssr.rs | 2 +- crates/ra_ssr/src/matching.rs | 2 +- crates/ra_ssr/src/parsing.rs | 2 +- crates/ra_ssr/src/tests.rs | 6 +++--- crates/rust-analyzer/src/bin/args.rs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/ra_ide/src/ssr.rs b/crates/ra_ide/src/ssr.rs index 6cb96608be..9f8e540c02 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}; use crate::SourceFileEdit; use ra_ssr::{MatchFinder, SsrError, SsrRule}; -// Feature: Structural Seach and Replace +// Feature: Structural Search and Replace // // Search and replace with named wildcards that will match any expression, type, path, pattern or item. // The syntax for a structural search replace command is ` ==>> `. diff --git a/crates/ra_ssr/src/matching.rs b/crates/ra_ssr/src/matching.rs index bb87bda431..54413a151e 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> { match self.next_non_trivial(&mut code_it) { None => { if let Some(p) = pattern_it.next() { - fail_match!("Part of the pattern was unmached: {:?}", p); + fail_match!("Part of the pattern was unmatched: {:?}", p); } return Ok(()); } diff --git a/crates/ra_ssr/src/parsing.rs b/crates/ra_ssr/src/parsing.rs index 1ae166d196..04d46bd326 100644 --- a/crates/ra_ssr/src/parsing.rs +++ b/crates/ra_ssr/src/parsing.rs @@ -55,7 +55,7 @@ impl FromStr for SsrRule { let pattern = it.next().expect("at least empty string").trim(); let template = it .next() - .ok_or_else(|| SsrError("Cannot find delemiter `==>>`".into()))? + .ok_or_else(|| SsrError("Cannot find delimiter `==>>`".into()))? .trim() .to_string(); if it.next().is_some() { diff --git a/crates/ra_ssr/src/tests.rs b/crates/ra_ssr/src/tests.rs index 8be60c2932..57b2f50b25 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 { #[test] fn parser_empty_query() { - assert_eq!(parse_error_text(""), "Parse error: Cannot find delemiter `==>>`"); + assert_eq!(parse_error_text(""), "Parse error: Cannot find delimiter `==>>`"); } #[test] fn parser_no_delimiter() { - assert_eq!(parse_error_text("foo()"), "Parse error: Cannot find delemiter `==>>`"); + assert_eq!(parse_error_text("foo()"), "Parse error: Cannot find delimiter `==>>`"); } #[test] @@ -227,7 +227,7 @@ fn assert_ssr_transforms(rules: &[&str], input: &str, result: &str) { let mut after = db.file_text(file_id).to_string(); edits.apply(&mut after); // Likewise, we need to make sure that whatever transformations fixture parsing applies, - // also get appplied to our expected result. + // also get applied to our expected result. let result = normalize_code(result); assert_eq!(after, result); } else { diff --git a/crates/rust-analyzer/src/bin/args.rs b/crates/rust-analyzer/src/bin/args.rs index 3f0bb3865f..cf1108e129 100644 --- a/crates/rust-analyzer/src/bin/args.rs +++ b/crates/rust-analyzer/src/bin/args.rs @@ -98,7 +98,7 @@ USAGE: rust-analyzer parse [FLAGS] FLAGS: - -h, --help Prints help inforamtion + -h, --help Prints help information --no-dump" ); return Ok(Err(HelpPrinted));