Use question_mark feature in librustc_metadata.
This commit is contained in:
parent
509aa235ba
commit
694d601dbc
@ -809,7 +809,7 @@ fn get_metadata_section_imp(target: &Target, flavor: CrateFlavor, filename: &Pat
|
||||
None => Err(format!("failed to read rlib metadata: '{}'",
|
||||
filename.display())),
|
||||
Some(blob) => {
|
||||
try!(verify_decompressed_encoding_version(&blob, filename));
|
||||
verify_decompressed_encoding_version(&blob, filename)?;
|
||||
Ok(blob)
|
||||
}
|
||||
};
|
||||
@ -858,7 +858,7 @@ fn get_metadata_section_imp(target: &Target, flavor: CrateFlavor, filename: &Pat
|
||||
match flate::inflate_bytes(bytes) {
|
||||
Ok(inflated) => {
|
||||
let blob = MetadataVec(inflated);
|
||||
try!(verify_decompressed_encoding_version(&blob, filename));
|
||||
verify_decompressed_encoding_version(&blob, filename)?;
|
||||
return Ok(blob);
|
||||
}
|
||||
Err(_) => {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user