Use Option::map instead of open-coding it
This commit is contained in:
parent
efdb859dcd
commit
76003f31f1
3 changed files with 17 additions and 25 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue