Skip to content

Commit 71478e0

Browse files
jonhoomatklad
andauthored
Update crates/project_model/src/cargo_workspace.rs
Co-authored-by: Aleksey Kladov <[email protected]>
1 parent 9802c0c commit 71478e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/project_model/src/cargo_workspace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ impl CargoWorkspace {
179179
Ok(stdout) => {
180180
let field = "host: ";
181181
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));
183183
if let Some(target) = target {
184184
Some(target.to_string())
185185
} else {

0 commit comments

Comments
 (0)