Use as_deref in compiler (but only where it makes sense)

This commit is contained in:
Maybe Waffle 2022-11-16 21:58:58 +00:00
parent e702534763
commit 94470f4efd
27 changed files with 45 additions and 63 deletions

View file

@ -304,7 +304,7 @@ pub fn run_compiler<R: Send>(config: Config, f: impl FnOnce(&Compiler) -> R + Se
parse_sess_created(&mut sess.parse_sess);
}
let temps_dir = sess.opts.unstable_opts.temps_dir.as_ref().map(|o| PathBuf::from(&o));
let temps_dir = sess.opts.unstable_opts.temps_dir.as_deref().map(PathBuf::from);
let compiler = Compiler {
sess: Lrc::new(sess),