Skip to content

fix: failing radon error tests #17

fix: failing radon error tests

fix: failing radon error tests #17

GitHub Actions / clippy failed Jan 12, 2024 in 1s

clippy

3 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 3
Warning 0
Note 0
Help 0

Versions

  • rustc 1.75.0 (82e1608df 2023-12-21)
  • cargo 1.75.0 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (82e1608 2023-12-21)

Annotations

Check failure on line 173 in data_structures/src/superblock.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `format!` to build up a string from an iterator

error: use of `format!` to build up a string from an iterator
   --> data_structures/src/superblock.rs:161:29
    |
161 |           let mut s: String = self
    |  _____________________________^
162 | |             .votes_on_each_superblock
163 | |             .iter()
164 | |             .map(|(superblock_hash, votes)| {
...   |
172 | |             })
173 | |             .collect();
    | |______________________^
    |
help: call `fold` instead
   --> data_structures/src/superblock.rs:164:14
    |
164 |             .map(|(superblock_hash, votes)| {
    |              ^^^
help: ... and use the `write!` macro here
   --> data_structures/src/superblock.rs:171:17
    |
171 |                 format!("  {}: {} votes: {:?}\n", superblock_hash, pkhs.len(), pkhs)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this can be written more efficiently by appending to a `String` directly
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
    = note: `-D clippy::format-collect` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::format_collect)]`

Check failure on line 173 in data_structures/src/superblock.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `format!` to build up a string from an iterator

error: use of `format!` to build up a string from an iterator
   --> data_structures/src/superblock.rs:161:29
    |
161 |           let mut s: String = self
    |  _____________________________^
162 | |             .votes_on_each_superblock
163 | |             .iter()
164 | |             .map(|(superblock_hash, votes)| {
...   |
172 | |             })
173 | |             .collect();
    | |______________________^
    |
help: call `fold` instead
   --> data_structures/src/superblock.rs:164:14
    |
164 |             .map(|(superblock_hash, votes)| {
    |              ^^^
help: ... and use the `write!` macro here
   --> data_structures/src/superblock.rs:171:17
    |
171 |                 format!("  {}: {} votes: {:?}\n", superblock_hash, pkhs.len(), pkhs)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this can be written more efficiently by appending to a `String` directly
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
    = note: `-D clippy::format-collect` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::format_collect)]`

Check failure on line 855 in data_structures/src/chain/priority.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

accessing first element with `input.get(0)`

error: accessing first element with `input.get(0)`
   --> data_structures/src/chain/priority.rs:855:35
    |
855 |         assert_eq!(engine.get(0), input.get(0));
    |                                   ^^^^^^^^^^^^ help: try: `input.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    = note: `-D clippy::get-first` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::get_first)]`