Skip to content

[Reproducible builds] v0.28.0 #5397

[Reproducible builds] v0.28.0

[Reproducible builds] v0.28.0 #5397

GitHub Actions / clippy failed Dec 28, 2023 in 1s

clippy

2 errors, 41 warnings

Details

Results

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

Versions

  • rustc 1.77.0-nightly (89e2160c4 2023-12-27)
  • cargo 1.77.0-nightly (ac6bbb332 2023-12-26)
  • clippy 0.1.76 (89e2160 2023-12-27)

Annotations

Check warning on line 192 in elrond-wasm-debug/src/world_mock/account_esdt.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

iterating on a map's keys

warning: iterating on a map's keys
   --> elrond-wasm-debug/src/world_mock/account_esdt.rs:192:39
    |
192 |         let esdt_keys: Vec<Vec<u8>> = self.clone().0.iter().map(|(k, _)| k.clone()).collect();
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.clone().0.keys().map(|k| k.clone())`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map

Check warning on line 27 in elrond-wasm-debug/src/world_mock/account_data.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

iterating on a map's keys

warning: iterating on a map's keys
  --> elrond-wasm-debug/src/world_mock/account_data.rs:27:46
   |
27 |         let mut storage_keys: Vec<Vec<u8>> = self.storage.iter().map(|(k, _)| k.clone()).collect();
   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.storage.keys().map(|k| k.clone())`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map
   = note: `#[warn(clippy::iter_kv_map)]` on by default

Check warning on line 126 in elrond-wasm-debug/src/tx_mock/tx_cache.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> elrond-wasm-debug/src/tx_mock/tx_cache.rs:126:36
    |
126 |         blockchain.accounts.extend(self.accounts.into_iter());
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `self.accounts`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/89e2160c4ca5808657ed55392620ed1dbbce78d1/library/core/src/iter/traits/collect.rs:372:18
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 110 in elrond-wasm-debug/src/tx_mock/tx_cache.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> elrond-wasm-debug/src/tx_mock/tx_cache.rs:110:21
    |
110 |             .extend(updates.accounts.into_iter());
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `updates.accounts`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/89e2160c4ca5808657ed55392620ed1dbbce78d1/library/core/src/iter/traits/collect.rs:372:18
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `#[warn(clippy::useless_conversion)]` on by default

Check warning on line 81 in elrond-wasm-debug/src/mandos_step/set_state.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

deref on an immutable reference

warning: deref on an immutable reference
  --> elrond-wasm-debug/src/mandos_step/set_state.rs:81:35
   |
81 |     if let Some(block_info_obj) = &*current_block_info {
   |                                   ^^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `current_block_info`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref

Check warning on line 78 in elrond-wasm-debug/src/mandos_step/set_state.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

deref on an immutable reference

warning: deref on an immutable reference
  --> elrond-wasm-debug/src/mandos_step/set_state.rs:78:35
   |
78 |     if let Some(block_info_obj) = &*previous_block_info {
   |                                   ^^^^^^^^^^^^^^^^^^^^^ help: if you would like to reborrow, try removing `&*`: `previous_block_info`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
   = note: `#[warn(clippy::borrow_deref_ref)]` on by default

Check warning on line 459 in elrond-wasm-debug/src/api/send_api_mock.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`usize` -> `usize`)

warning: casting to the same type is unnecessary (`usize` -> `usize`)
   --> elrond-wasm-debug/src/api/send_api_mock.rs:459:13
    |
459 |             num_return_data_after as usize,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num_return_data_after`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 458 in elrond-wasm-debug/src/api/send_api_mock.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

casting to the same type is unnecessary (`usize` -> `usize`)

warning: casting to the same type is unnecessary (`usize` -> `usize`)
   --> elrond-wasm-debug/src/api/send_api_mock.rs:458:13
    |
458 |             num_return_data_before as usize,
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `num_return_data_before`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    = note: `#[warn(clippy::unnecessary_cast)]` on by default

Check warning on line 27 in elrond-wasm-debug/src/abi_json/contract_abi_json.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `abi.constructors.get(0)`

warning: accessing first element with `abi.constructors.get(0)`
  --> elrond-wasm-debug/src/abi_json/contract_abi_json.rs:27:26
   |
27 |             constructor: abi.constructors.get(0).map(ConstructorAbiJson::from),
   |                          ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `abi.constructors.first()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
   = note: `#[warn(clippy::get_first)]` on by default

Check warning on line 1 in elrond-wasm-debug/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the feature `generic_associated_types` has been stable since 1.65.0 and no longer requires an attribute to enable

warning: the feature `generic_associated_types` has been stable since 1.65.0 and no longer requires an attribute to enable
 --> elrond-wasm-debug/src/lib.rs:1:12
  |
1 | #![feature(generic_associated_types)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(stable_features)]` on by default

Check warning on line 10 in elrond-wasm-debug/src/testing_framework/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `helper_macros::*`

warning: unused import: `helper_macros::*`
  --> elrond-wasm-debug/src/testing_framework/mod.rs:10:9
   |
10 | pub use helper_macros::*;
   |         ^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

Check warning on line 28 in mandos/src/serde_raw/value_raw_check_list.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> mandos/src/serde_raw/value_raw_check_list.rs:24:1
   |
24 | / impl Default for CheckValueListRaw {
25 | |     fn default() -> Self {
26 | |         CheckValueListRaw::Unspecified
27 | |     }
28 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = help: remove the manual implementation...
help: ...and instead derive it...
   |
8  + #[derive(Default)]
9  | pub enum CheckValueListRaw {
   |
help: ...and mark the default variant
   |
9  ~     #[default]
10 ~     Unspecified,
   |

Check warning on line 28 in mandos/src/serde_raw/value_raw_check.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> mandos/src/serde_raw/value_raw_check.rs:24:1
   |
24 | / impl Default for CheckBytesValueRaw {
25 | |     fn default() -> Self {
26 | |         CheckBytesValueRaw::Unspecified
27 | |     }
28 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = help: remove the manual implementation...
help: ...and instead derive it...
   |
8  + #[derive(Default)]
9  | pub enum CheckBytesValueRaw {
   |
help: ...and mark the default variant
   |
9  ~     #[default]
10 ~     Unspecified,
   |

Check warning on line 68 in elrond-wasm/src/types/managed/managed_buffer_cached_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

replacing an `Option` with `None`

warning: replacing an `Option` with `None`
  --> elrond-wasm/src/types/managed/managed_buffer_cached_builder.rs:68:36
   |
68 |         let mut static_cache_mut = core::mem::replace(&mut self.static_cache, None);
   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.static_cache.take()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none

Check warning on line 47 in elrond-wasm/src/types/managed/managed_buffer_cached_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

replacing an `Option` with `None`

warning: replacing an `Option` with `None`
  --> elrond-wasm/src/types/managed/managed_buffer_cached_builder.rs:47:32
   |
47 |         let old_static_cache = core::mem::replace(&mut self.static_cache, None);
   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.static_cache.take()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none
   = note: `#[warn(clippy::mem_replace_option_with_none)]` on by default

Check warning on line 36 in mandos/src/serde_raw/logs_raw.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> mandos/src/serde_raw/logs_raw.rs:32:1
   |
32 | / impl Default for CheckLogsRaw {
33 | |     fn default() -> Self {
34 | |         CheckLogsRaw::Unspecified
35 | |     }
36 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = help: remove the manual implementation...
help: ...and instead derive it...
   |
16 + #[derive(Default)]
17 | pub enum CheckLogsRaw {
   |
help: ...and mark the default variant
   |
19 ~     #[default]
20 ~     Unspecified,
   |

Check warning on line 28 in mandos/src/serde_raw/esdt_data_raw/esdt_map_raw_check.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> mandos/src/serde_raw/esdt_data_raw/esdt_map_raw_check.rs:24:1
   |
24 | / impl Default for CheckEsdtMapRaw {
25 | |     fn default() -> Self {
26 | |         CheckEsdtMapRaw::Unspecified
27 | |     }
28 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = help: remove the manual implementation...
help: ...and instead derive it...
   |
8  + #[derive(Default)]
9  | pub enum CheckEsdtMapRaw {
   |
help: ...and mark the default variant
   |
9  ~     #[default]
10 ~     Unspecified,
   |

Check warning on line 29 in mandos/src/serde_raw/esdt_data_raw/esdt_instances_raw_check.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> mandos/src/serde_raw/esdt_data_raw/esdt_instances_raw_check.rs:25:1
   |
25 | / impl Default for CheckEsdtInstancesRaw {
26 | |     fn default() -> Self {
27 | |         CheckEsdtInstancesRaw::Unspecified
28 | |     }
29 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = help: remove the manual implementation...
help: ...and instead derive it...
   |
9  + #[derive(Default)]
10 | pub enum CheckEsdtInstancesRaw {
   |
help: ...and mark the default variant
   |
10 ~     #[default]
11 ~     Unspecified,
   |

Check warning on line 200 in elrond-wasm/src/types/interaction/contract_call.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> elrond-wasm/src/types/interaction/contract_call.rs:200:41
    |
200 |                 new_arg_buffer.push_arg(&payment.token_nonce);
    |                                         ^^^^^^^^^^^^^^^^^^^^ help: change this to: `payment.token_nonce`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 41 in mandos/src/model/value/value_key_u64.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

non-canonical implementation of `partial_cmp` on an `Ord` type

warning: non-canonical implementation of `partial_cmp` on an `Ord` type
  --> mandos/src/model/value/value_key_u64.rs:37:1
   |
37 | /  impl PartialOrd for U64Key {
38 | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
   | | _____________________________________________________________-
39 | ||         self.value.partial_cmp(&other.value)
40 | ||     }
   | ||_____- help: change this to: `{ Some(self.cmp(other)) }`
41 | |  }
   | |__^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl

Check warning on line 38 in mandos/src/model/value/value_key_bytes.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

non-canonical implementation of `partial_cmp` on an `Ord` type

warning: non-canonical implementation of `partial_cmp` on an `Ord` type
  --> mandos/src/model/value/value_key_bytes.rs:34:1
   |
34 | /  impl PartialOrd for BytesKey {
35 | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
   | | _____________________________________________________________-
36 | ||         self.value.partial_cmp(&other.value)
37 | ||     }
   | ||_____- help: change this to: `{ Some(self.cmp(other)) }`
38 | |  }
   | |__^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_canonical_partial_ord_impl
   = note: `#[warn(clippy::non_canonical_partial_ord_impl)]` on by default

Check warning on line 32 in mandos/src/model/value/value_check.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `impl` can be derived

warning: this `impl` can be derived
  --> mandos/src/model/value/value_check.rs:25:1
   |
25 | / impl<T> Default for CheckValue<T>
26 | | where
27 | |     T: Default,
28 | | {
...  |
31 | |     }
32 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = note: `#[warn(clippy::derivable_impls)]` on by default
   = help: remove the manual implementation...
help: ...and instead derive it...
   |
11 + #[derive(Default)]
12 | pub enum CheckValue<T: Default> {
   |
help: ...and mark the default variant
   |
12 ~     #[default]
13 ~     Star,
   |

Check failure on line 464 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-1.3.2/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

&-masking with zero

error: &-masking with zero
  --> elrond-wasm/src/types/general/esdt_local_role_flags.rs:4:1
   |
4  | / bitflags! {
5  | |     pub struct EsdtLocalRoleFlags: u64 {
6  | |         const NONE                  = 0b00000000;
7  | |         const MINT                  = 0b00000001;
...  |
14 | |     }
15 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
   = note: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

Check failure on line 464 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitflags-1.3.2/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

&-masking with zero

error: &-masking with zero
  --> elrond-wasm/src/types/general/code_metadata.rs:6:1
   |
6  | / bitflags! {
7  | |     #[derive(Default)]
8  | |     pub struct CodeMetadata: u16 {
9  | |         const DEFAULT = 0;
...  |
14 | |     }
15 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bad_bit_mask
   = note: `#[deny(clippy::bad_bit_mask)]` on by default
   = note: this error originates in the macro `__impl_bitflags` which comes from the expansion of the macro `bitflags` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 143 in elrond-wasm/src/types/general/boxed_bytes.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

deref which would be done by auto-deref

warning: deref which would be done by auto-deref
   --> elrond-wasm/src/types/general/boxed_bytes.rs:143:9
    |
143 |         &*self.0
    |         ^^^^^^^^ help: try: `&self.0`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref