mirror of
https://github.com/oxalica/nil.git
synced 2025-12-23 09:19:49 +00:00
assists/inline: remove let-in check early return
This commit is contained in:
parent
d86634aaec
commit
763b72cf95
1 changed files with 5 additions and 1 deletions
|
|
@ -69,7 +69,11 @@ pub(super) fn inline(ctx: &mut AssistsCtx<'_>) -> Option<()> {
|
|||
_ => None,
|
||||
});
|
||||
|
||||
let is_letin = ast::LetIn::cast(path_value.syntax().parent()?).is_some();
|
||||
let is_letin = path_value
|
||||
.syntax()
|
||||
.parent()
|
||||
.and_then(ast::LetIn::cast)
|
||||
.is_some();
|
||||
if is_letin {
|
||||
rewrites.push(TextEdit {
|
||||
delete: path_value.syntax().text_range(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue