Skip to content

Commit beb81a4

Browse files
committed
simplify
1 parent 96d85a9 commit beb81a4

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

crates/ide/src/runnables.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,6 @@ impl Runnable {
7474
}
7575
}
7676

77-
pub fn can_debug(&self) -> bool {
78-
match self.kind {
79-
RunnableKind::DocTest { .. } => false,
80-
RunnableKind::TestMod { .. }
81-
| RunnableKind::Test { .. }
82-
| RunnableKind::Bench { .. }
83-
| RunnableKind::Bin => true,
84-
}
85-
}
86-
8777
pub fn title(&self) -> String {
8878
let mut s = String::from("▶\u{fe0e} Run ");
8979
if self.use_name_in_title {

crates/rust-analyzer/src/to_proto.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,13 @@ pub(crate) fn code_lens(
998998
let annotation_range = range(&line_index, annotation.range);
999999

10001000
let title = run.title();
1001-
let can_debug = run.can_debug();
1001+
let can_debug = match run.kind {
1002+
ide::RunnableKind::DocTest { .. } => false,
1003+
ide::RunnableKind::TestMod { .. }
1004+
| ide::RunnableKind::Test { .. }
1005+
| ide::RunnableKind::Bench { .. }
1006+
| ide::RunnableKind::Bin => true,
1007+
};
10021008
let r = runnable(snap, run)?;
10031009

10041010
let lens_config = snap.config.lens();

0 commit comments

Comments
 (0)