codegen: Remove needless allocation

This commit is contained in:
Taiki Endo
2024-06-21 22:08:16 +09:00
parent 60a32c3819
commit 926cd2a86f

View File

@@ -291,11 +291,8 @@ fn main() -> Result<()> {
Path::new(&url).file_name().unwrap().to_str().unwrap()
));
let response = download(&url)?;
let etag = response
.header("etag")
.expect("binary should have an etag")
.to_string()
.replace('\"', "");
let etag =
response.header("etag").expect("binary should have an etag").replace('\"', "");
if let Some(ManifestRef::Real(ref manifest)) = existing_manifest {
if let Some(entry) = manifest.download_info.get(&platform) {