diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-16 21:58:58 +0000 | 
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-11-16 21:58:58 +0000 | 
| commit | 94470f4efd2ec0786dd1f201e9ea84651b4bb0d0 (patch) | |
| tree | 1bcf415fa3d0bedc9b223162446ab9653c8f5bec /compiler/rustc_driver/src/lib.rs | |
| parent | e702534763599db252f2ca308739ec340d0933de (diff) | |
| download | rust-94470f4efd2ec0786dd1f201e9ea84651b4bb0d0.tar.gz rust-94470f4efd2ec0786dd1f201e9ea84651b4bb0d0.zip | |
Use `as_deref` in compiler (but only where it makes sense)
Diffstat (limited to 'compiler/rustc_driver/src/lib.rs')
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 9 | 
1 files changed, 3 insertions, 6 deletions
| diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index e043368fdfe..145d93d52d1 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -318,7 +318,7 @@ fn run_compiler( compiler.input(), &*expanded_crate, *ppm, - compiler.output_file().as_ref().map(|p| &**p), + compiler.output_file().as_deref(), ); Ok(()) })?; @@ -329,7 +329,7 @@ fn run_compiler( compiler.input(), &krate, *ppm, - compiler.output_file().as_ref().map(|p| &**p), + compiler.output_file().as_deref(), ); } trace!("finished pretty-printing"); @@ -383,10 +383,7 @@ fn run_compiler( &crate_name, compiler.input(), None, - DumpHandler::new( - compiler.output_dir().as_ref().map(|p| &**p), - &crate_name, - ), + DumpHandler::new(compiler.output_dir().as_deref(), &crate_name), ) }); } | 
