We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee2223f commit 06e28c4Copy full SHA for 06e28c4
1 file changed
src/bindgen/cargo/cargo_metadata.rs
@@ -202,14 +202,9 @@ fn discover_target(manifest_path: &Path) -> Option<String> {
202
};
203
204
let field = "host: ";
205
- rustc_output.lines().find_map(|l| {
206
- // XXX l.strip_prefix(field) re-implemented to preserve MSRV
207
- if l.starts_with(field) {
208
- Some(l[field.len()..].into())
209
- } else {
210
- None
211
- }
212
- })
+ rustc_output
+ .lines()
+ .find_map(|l| l.strip_prefix(field).map(|stripped| stripped.to_string()))
213
}
214
215
/// The main entry point to obtaining metadata
0 commit comments