Skip to content

fix: specify simdnbt tag #56

fix: specify simdnbt tag

fix: specify simdnbt tag #56

GitHub Actions / clippy failed May 26, 2024 in 0s

clippy

2 errors, 20 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 2
Warning 20
Note 0
Help 0

Versions

  • rustc 1.80.0-nightly (1ba35e9bb 2024-05-25)
  • cargo 1.80.0-nightly (a8d72c675 2024-05-24)
  • clippy 0.1.80 (1ba35e9 2024-05-25)

Annotations

Check failure on line 62 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function takes 2 arguments but 1 argument was supplied

error[E0061]: this function takes 2 arguments but 1 argument was supplied
   --> azalea-core/src/registry_holder.rs:62:23
    |
62  |         let nbt_tag = simdnbt::borrow::NbtTag::read(buf)?;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----- an argument of type `&simdnbt::borrow::tag_alloc::TagAllocator<'_>` is missing
    |
note: associated function defined here
   --> /home/runner/.cargo/git/checkouts/simdnbt-6350c7beb21f1e0d/c83d298/simdnbt/src/borrow/mod.rs:205:12
    |
205 |     pub fn read(data: &mut Cursor<&'a [u8]>, alloc: &TagAllocator<'a>) -> Result<Self, Error> {
    |            ^^^^
help: provide the argument
    |
62  |         let nbt_tag = simdnbt::borrow::NbtTag::read(buf, /* &simdnbt::borrow::tag_alloc::TagAllocator<'_> */)?;
    |                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 38 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function takes 2 arguments but 1 argument was supplied

error[E0061]: this function takes 2 arguments but 1 argument was supplied
  --> azalea-core/src/registry_holder.rs:38:13
   |
38 |             simdnbt::borrow::NbtCompound::read(&mut Cursor::new(&nbt_bytes)).ok()?;
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------------------ an argument of type `&simdnbt::borrow::tag_alloc::TagAllocator<'_>` is missing
   |
note: associated function defined here
  --> /home/runner/.cargo/git/checkouts/simdnbt-6350c7beb21f1e0d/c83d298/simdnbt/src/borrow/compound.rs:22:12
   |
22 |     pub fn read(data: &mut Cursor<&'a [u8]>, alloc: &TagAllocator<'a>) -> Result<Self, Error> {
   |            ^^^^
help: provide the argument
   |
38 |             simdnbt::borrow::NbtCompound::read(&mut Cursor::new(&nbt_bytes), /* &simdnbt::borrow::tag_alloc::TagAllocator<'_> */).ok()?;
   |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 351 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:351:12
    |
351 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 344 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:344:12
    |
344 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 337 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:337:12
    |
337 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 327 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:327:12
    |
327 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 318 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:318:12
    |
318 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 309 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:309:12
    |
309 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 289 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:289:12
    |
289 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 248 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:248:12
    |
248 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 238 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:238:12
    |
238 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 194 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:194:12
    |
194 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 179 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:179:11
    |
179 | #[cfg(not(feature = "strict_registry"))]
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 144 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:144:7
    |
144 | #[cfg(feature = "strict_registry")]
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 133 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:133:12
    |
133 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 124 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:124:12
    |
124 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 116 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:116:12
    |
116 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 105 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
   --> azalea-core/src/registry_holder.rs:105:12
    |
105 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `bevy_ecs` and `serde`
    = help: consider adding `strict_registry` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 94 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
  --> azalea-core/src/registry_holder.rs:94:12
   |
94 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `bevy_ecs` and `serde`
   = help: consider adding `strict_registry` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration

Check warning on line 82 in azalea-core/src/registry_holder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unexpected `cfg` condition value: `strict_registry`

warning: unexpected `cfg` condition value: `strict_registry`
  --> azalea-core/src/registry_holder.rs:82:12
   |
82 | #[cfg_attr(feature = "strict_registry", simdnbt(deny_unknown_fields))]
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: expected values for `feature` are: `bevy_ecs` and `serde`
   = help: consider adding `strict_registry` as a feature in `Cargo.toml`
   = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
   = note: `#[warn(unexpected_cfgs)]` on by default

Check warning on line 140 in azalea-buf/src/write.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric method

warning: usage of a legacy numeric method
   --> azalea-buf/src/write.rs:140:42
    |
140 |             value = (value >> 7) & (i64::max_value() >> 6);
    |                                          ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
140 |             value = (value >> 7) & (i64::MAX >> 6);
    |                                          ~~~

Check warning on line 44 in azalea-buf/src/write.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

usage of a legacy numeric method

warning: usage of a legacy numeric method
  --> azalea-buf/src/write.rs:44:42
   |
44 |             value = (value >> 7) & (i32::max_value() >> 6);
   |                                          ^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
   = note: `#[warn(clippy::legacy_numeric_constants)]` on by default
help: use the associated constant instead
   |
44 |             value = (value >> 7) & (i32::MAX >> 6);
   |                                          ~~~