From a741bb20550e3e86f924f63d18eac1f86d5b3059 Mon Sep 17 00:00:00 2001 From: DropDemBits Date: Sun, 2 Jun 2024 14:09:36 -0400 Subject: [PATCH] fix typos & formatting --- crates/ide-assists/src/utils.rs | 4 ++-- crates/syntax/src/parsing.rs | 6 +++++- 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 { - // 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) { +pub(crate) fn parse_text_at( + text: &str, + entry: parser::TopEntryPoint, + edition: parser::Edition, +) -> (GreenNode, Vec) { let _p = tracing::span!(tracing::Level::INFO, "parse_text_at").entered(); let lexed = parser::LexedStr::new(text); let parser_input = lexed.to_input();