mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 14:43:24 +00:00
simplify
This commit is contained in:
parent
ddce16a126
commit
a04775060c
@ -29,7 +29,7 @@ pub struct Annotation {
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum AnnotationKind {
|
||||
Runnable { runnable: Runnable },
|
||||
Runnable(Runnable),
|
||||
HasImpls { position: FilePosition, data: Option<Vec<NavigationTarget>> },
|
||||
HasReferences { position: FilePosition, data: Option<Vec<FileRange>> },
|
||||
}
|
||||
@ -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) });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user