Skip to content

Commit

Permalink
minor: tweak comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash committed Jul 20, 2024
1 parent a2d142b commit 18e7299
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/ide/src/inlay_hints/closing_brace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ pub(super) fn hints(
let module = ast::Module::cast(list.syntax().parent()?)?;
(format!("mod {}", module.name()?), module.name().map(name))
} else if let Some(label) = ast::Label::cast(node.clone()) {
// in this case, `ast::Label` could be seen as a part of `ast::BlockExpr`, to respect the `min_lines` config
// in this case, `ast::Label` could be seen as a part of `ast::BlockExpr`
// the actual number of lines in this case should be the line count of the parent BlockExpr, which the `min_lines` config care about
node = node.parent()?;
let block = label.syntax().parent().and_then(ast::BlockExpr::cast)?;
closing_token = block.stmt_list()?.r_curly_token()?;
Expand Down

0 comments on commit 18e7299

Please sign in to comment.