Don't show const items initializer expressions on hover

This commit is contained in:
Lukas Wirth 2021-03-09 16:33:23 +01:00
parent 472641fc5b
commit 983726a45c

View File

@ -71,11 +71,7 @@ fn short_label(&self) -> Option<String> {
impl ShortLabel for ast::Const {
fn short_label(&self) -> Option<String> {
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 ")
}
}