From 246339bdbf778285c54d8f1ee3390db466498eb2 Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Sun, 8 Dec 2024 18:34:37 +0100 Subject: [PATCH] Align clippy features between CI jobs; address lifetimes in serde --- .github/workflows/full-ci.yml | 2 +- .github/workflows/minimal-ci.yml | 2 +- .github/workflows/release-version.yml | 8 ++++---- godot-core/src/builtin/string/gstring.rs | 2 +- godot-core/src/builtin/string/string_name.rs | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/full-ci.yml b/.github/workflows/full-ci.yml index b9e8ecc5a..6a8ce8ce4 100644 --- a/.github/workflows/full-ci.yml +++ b/.github/workflows/full-ci.yml @@ -17,7 +17,7 @@ on: env: # Applies to all 'register-docs' features across crates. - CLIPPY_FEATURES: '--features register-docs' + CLIPPY_FEATURES: '--features register-docs,godot/experimental-godot-api,godot/serde' TEST_FEATURES: '' RETRY: ${{ github.workspace }}/.github/other/retry.sh diff --git a/.github/workflows/minimal-ci.yml b/.github/workflows/minimal-ci.yml index 2879d7d79..a5e3778e3 100644 --- a/.github/workflows/minimal-ci.yml +++ b/.github/workflows/minimal-ci.yml @@ -22,7 +22,7 @@ on: env: # Applies to all 'register-docs' features across crates. - CLIPPY_FEATURES: '--features register-docs' + CLIPPY_FEATURES: '--features register-docs,godot/experimental-godot-api,godot/serde' TEST_FEATURES: '' # GDEXT_CRATE_ARGS: '-p godot-codegen -p godot-ffi -p godot-core -p godot-macros -p godot' RETRY: ${{ github.workspace }}/.github/other/retry.sh diff --git a/.github/workflows/release-version.yml b/.github/workflows/release-version.yml index 43e03de3e..303095b2d 100644 --- a/.github/workflows/release-version.yml +++ b/.github/workflows/release-version.yml @@ -14,8 +14,8 @@ on: - 'v0.[0-9]+.[0-9]+' env: - # Note: used for test and clippy, not for publish - GDEXT_FEATURES: "--features godot/experimental-godot-api,godot/codegen-rustfmt,godot/serde" + # Note: used for test and clippy, not for publish. Test features are different from other CIs. + CLIPPY_TEST_FEATURES: "--features godot/experimental-godot-api,godot/codegen-rustfmt,godot/serde" # Crates to publish -- important, this doesn't work when there are spaces in any of the paths! # Keep in sync with update-version.sh @@ -108,7 +108,7 @@ jobs: run: rustup update stable - name: "Compile and run test" - run: cargo test $GDEXT_FEATURES + run: cargo test $CLIPPY_TEST_FEATURES clippy: runs-on: ubuntu-latest @@ -121,7 +121,7 @@ jobs: - name: "Check clippy" run: | - cargo clippy --all-targets $GDEXT_FEATURES -- \ + cargo clippy --all-targets $CLIPPY_TEST_FEATURES -- \ -D clippy::suspicious \ -D clippy::style \ -D clippy::complexity \ diff --git a/godot-core/src/builtin/string/gstring.rs b/godot-core/src/builtin/string/gstring.rs index af52bfb29..a32b13d95 100644 --- a/godot-core/src/builtin/string/gstring.rs +++ b/godot-core/src/builtin/string/gstring.rs @@ -384,7 +384,7 @@ mod serialize { D: Deserializer<'de>, { struct GStringVisitor; - impl<'de> Visitor<'de> for GStringVisitor { + impl Visitor<'_> for GStringVisitor { type Value = GString; fn expecting(&self, formatter: &mut Formatter) -> fmt::Result { diff --git a/godot-core/src/builtin/string/string_name.rs b/godot-core/src/builtin/string/string_name.rs index fe3580e7c..30fd56892 100644 --- a/godot-core/src/builtin/string/string_name.rs +++ b/godot-core/src/builtin/string/string_name.rs @@ -421,7 +421,7 @@ mod serialize { D: Deserializer<'de>, { struct StringNameVisitor; - impl<'de> Visitor<'de> for StringNameVisitor { + impl Visitor<'_> for StringNameVisitor { type Value = StringName; fn expecting(&self, formatter: &mut Formatter) -> fmt::Result {