1
Fork 0

Auto merge of #98160 - nnethercote:mv-finish-out-of-Encoder, r=bjorn3

Move `finish` out of the `Encoder` trait.

This simplifies things, but requires making `CacheEncoder` non-generic.

(This was previously merged as commit 4 in #94732 and then was reverted
in #97905 because it caused a perf regression.)

r? `@ghost`
This commit is contained in:
bors 2022-06-17 05:13:07 +00:00
commit 0423e06ca9
13 changed files with 51 additions and 111 deletions

View file

@ -211,7 +211,7 @@ impl CodegenResults {
encoder.emit_raw_bytes(&RLINK_VERSION.to_be_bytes());
encoder.emit_str(RUSTC_VERSION.unwrap());
Encodable::encode(codegen_results, &mut encoder);
encoder.finish().unwrap()
encoder.finish()
}
pub fn deserialize_rlink(data: Vec<u8>) -> Result<Self, String> {