From bd9bab87ed72779c3bf407137928b75555f5d2a9 Mon Sep 17 00:00:00 2001 From: k-nasa Date: Wed, 13 Oct 2021 23:07:49 +0900 Subject: [PATCH] fix --- crates/ide_assists/src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ide_assists/src/utils.rs b/crates/ide_assists/src/utils.rs index 22221afe74f..ea7edadfe95 100644 --- a/crates/ide_assists/src/utils.rs +++ b/crates/ide_assists/src/utils.rs @@ -310,9 +310,9 @@ fn calc_depth(pat: &ast::Pat, depth: usize) -> usize { | ast::Pat::RefPat(_) | ast::Pat::SlicePat(_) | ast::Pat::TuplePat(_) - | ast::Pat::ConstBlockPat(_) => 1, + | ast::Pat::ConstBlockPat(_) => depth, - // TODO: Other patterns may also be nested. Currently it simply supports only `TupleStructPat` + // FIXME: Other patterns may also be nested. Currently it simply supports only `TupleStructPat` ast::Pat::TupleStructPat(pat) => { let mut max_depth = depth; for p in pat.fields() {