simplify
This commit is contained in:
@@ -74,16 +74,6 @@ impl Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn can_debug(&self) -> bool {
|
|
||||||
match self.kind {
|
|
||||||
RunnableKind::DocTest { .. } => false,
|
|
||||||
RunnableKind::TestMod { .. }
|
|
||||||
| RunnableKind::Test { .. }
|
|
||||||
| RunnableKind::Bench { .. }
|
|
||||||
| RunnableKind::Bin => true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn title(&self) -> String {
|
pub fn title(&self) -> String {
|
||||||
let mut s = String::from("▶\u{fe0e} Run ");
|
let mut s = String::from("▶\u{fe0e} Run ");
|
||||||
if self.use_name_in_title {
|
if self.use_name_in_title {
|
||||||
|
|||||||
@@ -998,7 +998,13 @@ pub(crate) fn code_lens(
|
|||||||
let annotation_range = range(&line_index, annotation.range);
|
let annotation_range = range(&line_index, annotation.range);
|
||||||
|
|
||||||
let title = run.title();
|
let title = run.title();
|
||||||
let can_debug = run.can_debug();
|
let can_debug = match run.kind {
|
||||||
|
ide::RunnableKind::DocTest { .. } => false,
|
||||||
|
ide::RunnableKind::TestMod { .. }
|
||||||
|
| ide::RunnableKind::Test { .. }
|
||||||
|
| ide::RunnableKind::Bench { .. }
|
||||||
|
| ide::RunnableKind::Bin => true,
|
||||||
|
};
|
||||||
let r = runnable(snap, run)?;
|
let r = runnable(snap, run)?;
|
||||||
|
|
||||||
let lens_config = snap.config.lens();
|
let lens_config = snap.config.lens();
|
||||||
|
|||||||
Reference in New Issue
Block a user