diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-07 13:30:08 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-06-08 07:01:26 +1000 |
| commit | 582b9cbc45334a73467d6ccaf0a8b9de559c2011 (patch) | |
| tree | 3ecef238c65bc2288c5f4262529f7a7ac7bf4fb8 /compiler/rustc_codegen_ssa/src | |
| parent | 92b1ab8d57c73468dd648b013ec8b7952b6e3c53 (diff) | |
| download | rust-582b9cbc45334a73467d6ccaf0a8b9de559c2011.tar.gz rust-582b9cbc45334a73467d6ccaf0a8b9de559c2011.zip | |
Don't pass in a vector to `Encoder::new`.
It's not necessary.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<u8> { - 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`. |
