From a04775060cb8c645e20e5fdcf0a1e73c3a4eec6e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 11 Jul 2021 13:49:38 +0300 Subject: [PATCH] simplify --- crates/ide/src/annotations.rs | 4 ++-- crates/rust-analyzer/src/to_proto.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ide/src/annotations.rs b/crates/ide/src/annotations.rs index 27a335f04e13..fd234358c590 100644 --- a/crates/ide/src/annotations.rs +++ b/crates/ide/src/annotations.rs @@ -29,7 +29,7 @@ pub struct Annotation { #[derive(Debug)] pub enum AnnotationKind { - Runnable { runnable: Runnable }, + Runnable(Runnable), HasImpls { position: FilePosition, data: Option> }, HasReferences { position: FilePosition, data: Option> }, } @@ -59,7 +59,7 @@ pub(crate) fn annotations( let range = runnable.nav.focus_or_full_range(); - annotations.push(Annotation { range, kind: AnnotationKind::Runnable { runnable } }); + annotations.push(Annotation { range, kind: AnnotationKind::Runnable(runnable) }); } } diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index d7b278f011c5..060b69e08800 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -993,7 +993,7 @@ pub(crate) fn code_lens( annotation: Annotation, ) -> Result<()> { match annotation.kind { - AnnotationKind::Runnable { runnable: run } => { + AnnotationKind::Runnable(run) => { let line_index = snap.file_line_index(run.nav.file_id)?; let annotation_range = range(&line_index, annotation.range);