5132: Fix some typos r=matklad a=davidlattimore



Co-authored-by: David Lattimore <dml@google.com>
This commit is contained in:
bors[bot] 2020-06-30 08:45:16 +00:00 committed by GitHub
commit e87cba85ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View file

@ -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 `<search_pattern> ==>> <replace_pattern>`.

View file

@ -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(());
}

View file

@ -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() {

View file

@ -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 {

View file

@ -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));