Merge pull request #2643 from cgwalters/rust-2021
rust: Switch to 2021 edition, bump MSRV, a few `format!` updates
This commit is contained in:
7 files changed
+11
-11
No files matched your search
@@ -2,7 +2,7 @@
|
||||
name = "ostree-test"
|
||||
version = "0.1.0"
|
||||
authors = ["Colin Walters <walters@verbum.org>"]
|
||||
edition = "2018"
|
||||
edition = "2021"
|
||||
|
||||
[workspace]
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@ fn impl_transaction_test<M: AsRef<str>>(
|
||||
booted: booted_commit.to_string(),
|
||||
orig: sysrepo_obj.resolve_rev(ORIGREF, false)?.unwrap().into(),
|
||||
prev: srvrepo_obj
|
||||
.resolve_rev(&format!("{}^", TESTREF), false)?
|
||||
.resolve_rev(&format!("{TESTREF}^"), false)?
|
||||
.unwrap()
|
||||
.into(),
|
||||
target: srvrepo_obj.resolve_rev(TESTREF, false)?.unwrap().into(),
|
||||
@@ -568,7 +568,7 @@ pub(crate) fn itest_transactionality() -> Result<()> {
|
||||
..Default::default()
|
||||
};
|
||||
with_webserver_in(&srvrepo, &webserver_opts, move |addr| {
|
||||
let url = format!("http://{}", addr);
|
||||
let url = format!("http://{addr}");
|
||||
bash!(
|
||||
"ostree remote delete --if-exists testrepo
|
||||
ostree remote add --set=gpg-verify=false testrepo ${url}",
|
||||
|
||||
@@ -31,9 +31,9 @@ pub(crate) fn mkvroot<P: AsRef<Path>>(p: P, v: u32) -> Result<()> {
|
||||
std::fs::create_dir_all(p.join(v))?;
|
||||
}
|
||||
let verpath = p.join("etc/.mkrootversion");
|
||||
write_file(&verpath, &format!("{}", v))?;
|
||||
write_file(p.join("usr/bin/somebinary"), &format!("somebinary v{}", v))?;
|
||||
write_file(p.join("etc/someconf"), &format!("someconf v{}", v))?;
|
||||
write_file(&verpath, &format!("{v}"))?;
|
||||
write_file(p.join("usr/bin/somebinary"), &format!("somebinary v{v}"))?;
|
||||
write_file(p.join("etc/someconf"), &format!("someconf v{v}"))?;
|
||||
write_file(p.join("usr/bin/vmod2"), &format!("somebinary v{}", v % 2))?;
|
||||
write_file(p.join("usr/bin/vmod3"), &format!("somebinary v{}", v % 3))?;
|
||||
Ok(())
|
||||
@@ -134,7 +134,7 @@ pub(crate) fn update_os_tree<P: AsRef<Path>>(
|
||||
tempdir.ensure_dir(v, 0o755)?;
|
||||
let dest = tempdir.sub_dir(v)?;
|
||||
mutated += mutate_executables_to(&src, &dest, percentage)
|
||||
.with_context(|| format!("Replacing binaries in {}", v))?;
|
||||
.with_context(|| format!("Replacing binaries in {v}"))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user