Skip to content

Commit 512c750

Browse files
committed
fix humanize union
1 parent 6f4e695 commit 512c750

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

crates/emmylua_code_analysis/src/db_index/type/humanize_type.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,9 @@ where
210210
type_strings.push(type_str);
211211
}
212212
}
213-
// 取指定数量的类型
213+
let dots = if type_strings.len() > num { "..." } else { "" };
214214
let display_types: Vec<_> = type_strings.into_iter().take(num).collect();
215215
let type_str = display_types.join("|");
216-
let dots = if display_types.len() < types.len() {
217-
"..."
218-
} else {
219-
""
220-
};
221216

222217
if display_types.len() == 1 {
223218
if has_function && has_nil {

0 commit comments

Comments
 (0)