use &Path instead of AsRef<Path>
This commit is contained in:
parent
dcb599fe6c
commit
47c36893a1
1 changed files with 3 additions and 3 deletions
|
@ -2195,7 +2195,7 @@ impl<D: Decoder> Decodable<D> for EncodedMetadata {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn encode_metadata(tcx: TyCtxt<'_>, path: impl AsRef<Path> + Send) {
|
||||
pub fn encode_metadata(tcx: TyCtxt<'_>, path: &Path) {
|
||||
let _prof_timer = tcx.prof.verbose_generic_activity("generate_crate_metadata");
|
||||
|
||||
// Since encoding metadata is not in a query, and nothing is cached,
|
||||
|
@ -2216,8 +2216,8 @@ pub fn encode_metadata(tcx: TyCtxt<'_>, path: impl AsRef<Path> + Send) {
|
|||
);
|
||||
}
|
||||
|
||||
fn encode_metadata_impl(tcx: TyCtxt<'_>, path: impl AsRef<Path>) {
|
||||
let mut encoder = opaque::FileEncoder::new(path.as_ref())
|
||||
fn encode_metadata_impl(tcx: TyCtxt<'_>, path: &Path) {
|
||||
let mut encoder = opaque::FileEncoder::new(path)
|
||||
.unwrap_or_else(|err| tcx.sess.fatal(&format!("failed to create file encoder: {}", err)));
|
||||
encoder.emit_raw_bytes(METADATA_HEADER);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue