mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 11:24:24 +00:00
Cleaned up code based on feedback
This commit is contained in:
parent
301b8894ea
commit
5313bd1984
3 changed files with 13 additions and 16 deletions
|
@ -349,7 +349,7 @@ pub(super) fn definition(
|
|||
Definition::Function(it) => label_and_docs(db, it),
|
||||
Definition::Adt(it) => label_and_docs(db, it),
|
||||
Definition::Variant(it) => label_value_and_docs(db, it, |&it| {
|
||||
if it.parent.is_data_carrying(db) {
|
||||
if !it.parent_enum(db).is_data_carrying(db) {
|
||||
match it.eval(db) {
|
||||
Ok(x) => Some(format!("{}", x)),
|
||||
Err(_) => it.value(db).map(|x| format!("{:?}", x)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue