From 9163665a292ded0a26ec4e16167cee454b055dc0 Mon Sep 17 00:00:00 2001 From: Luca BRUNO Date: Wed, 26 Oct 2022 06:46:09 +0000 Subject: [PATCH] ci/rust: bump linting toolchain to latest stable (1.64) This bumps the Rust toolchain for clippy/rustfmt to 1.64. --- .github/workflows/rust.yml | 2 +- .../repo_checkout_at_options/repo_checkout_filter.rs | 1 + rust-bindings/src/sysroot_deploy_tree_opts.rs | 10 +--------- rust-bindings/src/sysroot_write_deployments_opts.rs | 9 +-------- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index affeb42b..bca9b691 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,7 +17,7 @@ env: # Minimum supported Rust version (MSRV) ACTION_MSRV_TOOLCHAIN: 1.58.1 # Pinned toolchain for linting - ACTION_LINTS_TOOLCHAIN: 1.56.0 + ACTION_LINTS_TOOLCHAIN: 1.64.0 jobs: build: diff --git a/rust-bindings/src/repo_checkout_at_options/repo_checkout_filter.rs b/rust-bindings/src/repo_checkout_at_options/repo_checkout_filter.rs index 17310e42..755efea2 100644 --- a/rust-bindings/src/repo_checkout_at_options/repo_checkout_filter.rs +++ b/rust-bindings/src/repo_checkout_at_options/repo_checkout_filter.rs @@ -18,6 +18,7 @@ use std::process::abort; /// /// # Return Value /// The return value determines whether the current file is checked out or skipped. +#[allow(clippy::type_complexity)] pub struct RepoCheckoutFilter(Box RepoCheckoutFilterResult>); impl RepoCheckoutFilter { diff --git a/rust-bindings/src/sysroot_deploy_tree_opts.rs b/rust-bindings/src/sysroot_deploy_tree_opts.rs index 62376f76..a2db5c2e 100644 --- a/rust-bindings/src/sysroot_deploy_tree_opts.rs +++ b/rust-bindings/src/sysroot_deploy_tree_opts.rs @@ -3,6 +3,7 @@ use glib::translate::*; use libc::c_char; /// Options for deploying an ostree commit. +#[derive(Default)] pub struct SysrootDeployTreeOpts<'a> { /// Use these kernel arguments. pub override_kernel_argv: Option<&'a [&'a str]>, @@ -10,15 +11,6 @@ pub struct SysrootDeployTreeOpts<'a> { pub overlay_initrds: Option<&'a [&'a str]>, } -impl<'a> Default for SysrootDeployTreeOpts<'a> { - fn default() -> Self { - SysrootDeployTreeOpts { - override_kernel_argv: None, - overlay_initrds: None, - } - } -} - type OptionStrSliceStorage<'a> = as ToGlibPtr<'a, *mut *mut c_char>>::Storage; diff --git a/rust-bindings/src/sysroot_write_deployments_opts.rs b/rust-bindings/src/sysroot_write_deployments_opts.rs index 81c436c3..0c68e764 100644 --- a/rust-bindings/src/sysroot_write_deployments_opts.rs +++ b/rust-bindings/src/sysroot_write_deployments_opts.rs @@ -2,19 +2,12 @@ use ffi::OstreeSysrootWriteDeploymentsOpts; use glib::translate::*; /// Options for writing a deployment. +#[derive(Default)] pub struct SysrootWriteDeploymentsOpts { /// Perform cleanup after writing the deployment. pub do_postclean: bool, } -impl Default for SysrootWriteDeploymentsOpts { - fn default() -> Self { - SysrootWriteDeploymentsOpts { - do_postclean: false, - } - } -} - impl<'a> ToGlibPtr<'a, *const OstreeSysrootWriteDeploymentsOpts> for SysrootWriteDeploymentsOpts { type Storage = Box;