diff options
author | Jon Gjengset <[email protected]> | 2020-12-17 18:18:23 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-17 18:18:23 +0000 |
commit | 71478e067be8ce1a7cf9f5ec3ed654f8c204017f (patch) | |
tree | f64f02699110f1f96f169ad69c424bf5a23ecb04 /crates/project_model/src | |
parent | 9802c0ccd0cf408260961eb61581b61363c4b47b (diff) |
Update crates/project_model/src/cargo_workspace.rs
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/project_model/src')
-rw-r--r-- | crates/project_model/src/cargo_workspace.rs | 2 |
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 { |