diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a830c0e8..b9c972e2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,7 +15,7 @@ env: # TODO: Automatically query this from the C side LATEST_LIBOSTREE: "v2022_5" # Minimum supported Rust version (MSRV) - ACTION_MSRV_TOOLCHAIN: 1.54.0 + ACTION_MSRV_TOOLCHAIN: 1.58.1 # Pinned toolchain for linting ACTION_LINTS_TOOLCHAIN: 1.56.0 diff --git a/Cargo.toml b/Cargo.toml index ba61b145..5b6cce6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Felix Krull"] description = "Rust bindings for libostree" documentation = "https://docs.rs/ostree" -edition = "2018" +edition = "2021" keywords = ["ostree", "libostree"] license = "MIT" name = "ostree" diff --git a/rust-bindings/src/object_name.rs b/rust-bindings/src/object_name.rs index 06ff8045..ed4c1bfe 100644 --- a/rust-bindings/src/object_name.rs +++ b/rust-bindings/src/object_name.rs @@ -86,7 +86,7 @@ mod tests { #[test] fn should_stringify_object_name() { let object_name = ObjectName::new("abcdef123456", ObjectType::DirTree); - let stringified = format!("{}", object_name); + let stringified = format!("{object_name}"); assert_eq!(stringified, "abcdef123456.dirtree"); } diff --git a/rust-bindings/sys/Cargo.toml b/rust-bindings/sys/Cargo.toml index fd453454..5145ab87 100644 --- a/rust-bindings/sys/Cargo.toml +++ b/rust-bindings/sys/Cargo.toml @@ -73,7 +73,7 @@ links = "ostree-1" name = "ostree-sys" repository = "https://github.com/ostreedev/ostree-rs" version = "0.10.0" -edition = "2018" +edition = "2021" [package.metadata.docs.rs] features = ["dox"] [package.metadata.system-deps.ostree_1] diff --git a/tests/inst/Cargo.toml b/tests/inst/Cargo.toml index aed50ab6..e151c073 100644 --- a/tests/inst/Cargo.toml +++ b/tests/inst/Cargo.toml @@ -2,7 +2,7 @@ name = "ostree-test" version = "0.1.0" authors = ["Colin Walters "] -edition = "2018" +edition = "2021" [workspace] diff --git a/tests/inst/src/destructive.rs b/tests/inst/src/destructive.rs index 352ee6d5..6cce4b7a 100644 --- a/tests/inst/src/destructive.rs +++ b/tests/inst/src/destructive.rs @@ -363,7 +363,7 @@ fn impl_transaction_test>( 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}", diff --git a/tests/inst/src/treegen.rs b/tests/inst/src/treegen.rs index b6a3a704..29bdffd2 100644 --- a/tests/inst/src/treegen.rs +++ b/tests/inst/src/treegen.rs @@ -31,9 +31,9 @@ pub(crate) fn mkvroot>(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>( 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}"))?; } } }