From 582b9cbc45334a73467d6ccaf0a8b9de559c2011 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 7 Jun 2022 13:30:08 +1000 Subject: Don't pass in a vector to `Encoder::new`. It's not necessary. --- compiler/rustc_codegen_ssa/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_ssa/src') diff --git a/compiler/rustc_codegen_ssa/src/lib.rs b/compiler/rustc_codegen_ssa/src/lib.rs index 005825931d7..cc7efaac893 100644 --- a/compiler/rustc_codegen_ssa/src/lib.rs +++ b/compiler/rustc_codegen_ssa/src/lib.rs @@ -203,7 +203,7 @@ const RUSTC_VERSION: Option<&str> = option_env!("CFG_VERSION"); impl CodegenResults { pub fn serialize_rlink(codegen_results: &CodegenResults) -> Vec { - let mut encoder = opaque::Encoder::new(vec![]); + let mut encoder = opaque::Encoder::new(); encoder.emit_raw_bytes(RLINK_MAGIC).unwrap(); // `emit_raw_bytes` is used to make sure that the version representation does not depend on // Encoder's inner representation of `u32`. -- cgit 1.4.1-3-g733a5