aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/project_model/src/cargo_workspace.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/project_model/src/cargo_workspace.rs b/crates/project_model/src/cargo_workspace.rs
index 91fb645da..4d339d9c0 100644
--- a/crates/project_model/src/cargo_workspace.rs
+++ b/crates/project_model/src/cargo_workspace.rs
@@ -179,7 +179,7 @@ impl CargoWorkspace {
179 Ok(stdout) => { 179 Ok(stdout) => {
180 let field = "host: "; 180 let field = "host: ";
181 let target = 181 let target =
182 stdout.lines().find(|l| l.starts_with(field)).map(|l| &l[field.len()..]); 182 stdout.lines().find_map(|l| l.strip_prefix(field));
183 if let Some(target) = target { 183 if let Some(target) = target {
184 Some(target.to_string()) 184 Some(target.to_string())
185 } else { 185 } else {