Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 3cdfef2

Browse files
authored
Merge pull request #598 from bvinc/workspace_unwrap
Don't panic if we hit a cargo workspace when not in workspace mode
2 parents 194f828 + 53d2a89 commit 3cdfef2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/build/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ fn run_cargo(
142142
// Warn about invalid specified bin target or package depending on current mode
143143
// TODO: Return client notifications along with diagnostics to inform the user
144144
if !rls_config.workspace_mode {
145-
let cur_pkg_targets = ws.current().unwrap().targets();
145+
let cur_pkg_targets = ws.current()?.targets();
146146

147147
if let &Some(ref build_bin) = rls_config.build_bin.as_ref() {
148148
let mut bins = cur_pkg_targets.iter().filter(|x| x.is_bin());

0 commit comments

Comments
 (0)