Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/ra_ide/src/ssr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>`.
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_ssr/src/matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(());
}
Expand Down
2 changes: 1 addition & 1 deletion crates/ra_ssr/src/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions crates/ra_ssr/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/rust-analyzer/src/bin/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down