1
Fork 0

Use Option::map instead of open-coding it

This commit is contained in:
LingMan 2020-12-30 18:22:41 +01:00
parent efdb859dcd
commit 76003f31f1
3 changed files with 17 additions and 25 deletions

View file

@ -254,8 +254,6 @@ pub fn handle_native_features(sess: &Session) -> Vec<String> {
}
pub fn tune_cpu(sess: &Session) -> Option<&str> {
match sess.opts.debugging_opts.tune_cpu {
Some(ref s) => Some(handle_native(&**s)),
None => None,
}
let name = sess.opts.debugging_opts.tune_cpu.as_ref()?;
Some(handle_native(name))
}