Use strip_prefix
This commit is contained in:
parent
cd6c0e4e3b
commit
2f6662da85
@ -764,13 +764,7 @@ fn unw(x: Option<&str>) -> &str {
|
||||
println!("release: {}", unw(util::release_str()));
|
||||
|
||||
let debug_flags = matches.opt_strs("Z");
|
||||
let backend_name = debug_flags.iter().find_map(|x| {
|
||||
if x.starts_with("codegen-backend=") {
|
||||
Some(&x["codegen-backend=".len()..])
|
||||
} else {
|
||||
None
|
||||
}
|
||||
});
|
||||
let backend_name = debug_flags.iter().find_map(|x| x.strip_prefix("codegen-backend="));
|
||||
get_codegen_backend(&None, backend_name).print_version();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user