mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
replace is_some() -> unwrap with if let
This commit is contained in:
parent
fbce03b195
commit
ddcb073c53
@ -463,12 +463,8 @@ fn run_compiler(
|
||||
linker.link(sess, codegen_backend)?
|
||||
}
|
||||
|
||||
if sess.opts.unstable_opts.print_fuel.is_some() {
|
||||
eprintln!(
|
||||
"Fuel used by {}: {}",
|
||||
sess.opts.unstable_opts.print_fuel.as_ref().unwrap(),
|
||||
sess.print_fuel.load(Ordering::SeqCst)
|
||||
);
|
||||
if let Some(fuel) = sess.opts.unstable_opts.print_fuel.as_deref() {
|
||||
eprintln!("Fuel used by {}: {}", fuel, sess.print_fuel.load(Ordering::SeqCst));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user