mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-08 04:56:58 +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) => {
|
Ok(stdout) => {
|
||||||
let field = "host: ";
|
let field = "host: ";
|
||||||
let target =
|
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 {
|
if let Some(target) = target {
|
||||||
Some(target.to_string())
|
Some(target.to_string())
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user