From 983726a45cf3daafbf4b245e220773bd12897bb7 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Tue, 9 Mar 2021 16:33:23 +0100 Subject: [PATCH] Don't show const items initializer expressions on hover --- crates/ide/src/display/short_label.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/crates/ide/src/display/short_label.rs b/crates/ide/src/display/short_label.rs index 84b8883de5f..2df9266b41c 100644 --- a/crates/ide/src/display/short_label.rs +++ b/crates/ide/src/display/short_label.rs @@ -71,11 +71,7 @@ fn short_label(&self) -> Option { impl ShortLabel for ast::Const { fn short_label(&self) -> Option { - let mut new_buf = short_label_from_ty(self, self.ty(), "const ")?; - if let Some(expr) = self.body() { - format_to!(new_buf, " = {}", expr.syntax()); - } - Some(new_buf) + short_label_from_ty(self, self.ty(), "const ") } }