mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-01 09:33:26 +00:00
Update crates/project_model/src/cargo_workspace.rs
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
parent
9802c0ccd0
commit
71478e067b
@ -179,7 +179,7 @@ impl CargoWorkspace {
|
||||
Ok(stdout) => {
|
||||
let field = "host: ";
|
||||
let target =
|
||||
stdout.lines().find(|l| l.starts_with(field)).map(|l| &l[field.len()..]);
|
||||
stdout.lines().find_map(|l| l.strip_prefix(field));
|
||||
if let Some(target) = target {
|
||||
Some(target.to_string())
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user