Skip to content

Commit a6b2612

Browse files
committed
Fix build error & warning
1 parent 4872c13 commit a6b2612

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

xtask/src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ fn impl_package(sh: &Shell) -> Result<Package> {
155155
)
156156
.run()?;
157157
}
158-
// Compress with zstd
159-
let srcpath: Utf8PathBuf = format!("{p}.zstd").into();
160-
cmd!(sh, "zstd --rm -f {p} -o {srcpath}").run()?;
158+
// Compress with gzip
159+
let srcpath: Utf8PathBuf = format!("target/{namev}.crate").into();
160+
cmd!(sh, "gzip --force --best {p}").run()?;
161+
std::fs::rename(format!("{p}.gz"), &srcpath)?;
161162

162163
Ok(Package {
163164
version: v,
@@ -176,8 +177,7 @@ fn impl_srpm(sh: &Shell) -> Result<Utf8PathBuf> {
176177
let pkg = impl_package(sh)?;
177178
vendor(sh)?;
178179
let td = tempfile::tempdir_in("target").context("Allocating tmpdir")?;
179-
let td = td.into_path();
180-
let td: &Utf8Path = td.as_path().try_into().unwrap();
180+
let td: &Utf8Path = td.path().try_into().unwrap();
181181
let srcpath = td.join(pkg.srcpath.file_name().unwrap());
182182
std::fs::rename(pkg.srcpath, srcpath)?;
183183
let v = pkg.version;

0 commit comments

Comments
 (0)