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

@ -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),
)
});
}