diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index 7fadff2..caf9bab 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -10,9 +10,9 @@ jobs: strategy: fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Fetch toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@v1 with: profile: minimal toolchain: nightly diff --git a/.github/workflows/minimal-versions.yml b/.github/workflows/minimal-versions.yml index c9490c9..b92e5ae 100644 --- a/.github/workflows/minimal-versions.yml +++ b/.github/workflows/minimal-versions.yml @@ -10,9 +10,9 @@ jobs: strategy: fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Fetch toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@v1 with: profile: minimal toolchain: nightly diff --git a/.github/workflows/msrv-build.yml b/.github/workflows/msrv-build.yml index 641ea10..3ef2fa8 100644 --- a/.github/workflows/msrv-build.yml +++ b/.github/workflows/msrv-build.yml @@ -10,9 +10,9 @@ jobs: strategy: fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Fetch toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@v1 with: profile: minimal toolchain: 1.56.0 diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 156479b..929368d 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -15,11 +15,10 @@ jobs: toolchain: [stable, beta, nightly] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Fetch toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@v1 with: - profile: minimal toolchain: ${{ matrix.toolchain }} components: rustfmt, clippy target: thumbv6m-none-eabi diff --git a/Cargo.toml b/Cargo.toml index 968894b..de3e040 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,3 +3,4 @@ members = ["metadata_checks", "num_enum", "num_enum_derive", "renamed_num_enum", # Exclude num_enum_derive because its useful doc comments import num_enum, which the crate doesn't do (because it would # cause a circular dependency), so the doc tests don't actually compile. default-members = ["num_enum", "renamed_num_enum", "serde_example", "stress_tests"] +resolver = "2" diff --git a/num_enum_derive/src/parsing.rs b/num_enum_derive/src/parsing.rs index 9d511b5..cfc0b46 100644 --- a/num_enum_derive/src/parsing.rs +++ b/num_enum_derive/src/parsing.rs @@ -86,11 +86,11 @@ impl EnumInfo { } fn parse_attrs>( - mut attrs: Attrs, + attrs: Attrs, ) -> Result<(Ident, Option)> { let mut maybe_repr = None; let mut maybe_error_type = None; - while let Some(attr) = attrs.next() { + for attr in attrs { if let Meta::List(meta_list) = &attr.meta { if let Some(ident) = meta_list.path.get_ident() { if ident == "repr" {