Apply suggestions from code review

This commit is contained in:
vsrs
2020-06-08 13:56:31 +03:00
parent 9b4256dc4d
commit b7db9f058a
3 changed files with 21 additions and 21 deletions

View File

@@ -656,14 +656,14 @@ pub(crate) fn resolved_code_action(
pub(crate) fn runnable(
snap: &GlobalStateSnapshot,
file_id: FileId,
runnable: &Runnable,
runnable: Runnable,
) -> Result<lsp_ext::Runnable> {
let spec = CargoTargetSpec::for_file(snap, file_id)?;
let target = spec.as_ref().map(|s| s.target.clone());
let (cargo_args, executable_args) =
CargoTargetSpec::runnable_args(spec, &runnable.kind, &runnable.cfg_exprs)?;
let label = runnable.label(target);
let location = location_link(snap, None, runnable.nav.clone())?;
let location = location_link(snap, None, runnable.nav)?;
Ok(lsp_ext::Runnable {
label,