Unnamed repository; edit this file 'description' to name the repository.
fix typos & formatting
DropDemBits 2024-06-03
parent cf94010 · commit a741bb2
-rw-r--r--crates/ide-assists/src/utils.rs4
-rw-r--r--crates/syntax/src/parsing.rs6
2 files changed, 7 insertions, 3 deletions
diff --git a/crates/ide-assists/src/utils.rs b/crates/ide-assists/src/utils.rs
index b42779a902..ba6ef1921a 100644
--- a/crates/ide-assists/src/utils.rs
+++ b/crates/ide-assists/src/utils.rs
@@ -927,12 +927,12 @@ pub(crate) fn tt_from_syntax(node: SyntaxNode) -> Vec<NodeOrToken<ast::TokenTree
match token.kind() {
T!['('] | T!['{'] | T!['['] => {
- // Found an opening delimeter, start a new sub token tree
+ // Found an opening delimiter, start a new sub token tree
tt_stack.push((Some(token.kind()), vec![]));
}
T![')'] | T!['}'] | T![']'] => {
// Closing a subtree
- let (delimiter, tt) = tt_stack.pop().expect("unbalanced delimeters");
+ let (delimiter, tt) = tt_stack.pop().expect("unbalanced delimiters");
let (_, parent_tt) = tt_stack
.last_mut()
.expect("parent token tree was closed before it was completed");
diff --git a/crates/syntax/src/parsing.rs b/crates/syntax/src/parsing.rs
index 165109029f..a1ca3b3279 100644
--- a/crates/syntax/src/parsing.rs
+++ b/crates/syntax/src/parsing.rs
@@ -18,7 +18,11 @@ pub(crate) fn parse_text(text: &str, edition: parser::Edition) -> (GreenNode, Ve
(node, errors)
}
-pub(crate) fn parse_text_at(text: &str, entry: parser::TopEntryPoint, edition: parser::Edition) -> (GreenNode, Vec<SyntaxError>) {
+pub(crate) fn parse_text_at(
+ text: &str,
+ entry: parser::TopEntryPoint,
+ edition: parser::Edition,
+) -> (GreenNode, Vec<SyntaxError>) {
let _p = tracing::span!(tracing::Level::INFO, "parse_text_at").entered();
let lexed = parser::LexedStr::new(text);
let parser_input = lexed.to_input();