Skip to content

Bump borsh

Bump borsh #447

GitHub Actions / Clippy (MSRV) failed Sep 20, 2023 in 0s

Clippy (MSRV)

38 errors

Details

Results

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

Versions

  • rustc 1.67.0 (fc594f156 2023-01-24)
  • cargo 1.67.0 (8ecd4f20a 2023-01-10)
  • clippy 0.1.67 (fc594f1 2023-01-24)

Annotations

Check failure on line 506 in masp_primitives/src/transaction/components/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

the borrowed expression implements the required traits

error: the borrowed expression implements the required traits
   --> masp_primitives/src/transaction/components/sapling.rs:506:29
    |
506 |         let cv = read_point(&mut reader, "cv")?;
    |                             ^^^^^^^^^^^ help: change this to: `reader`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-D clippy::needless-borrow` implied by `-D warnings`

Check failure on line 192 in masp_primitives/src/transaction/components/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
   --> masp_primitives/src/transaction/components/sapling.rs:192:13
    |
192 |             format!("{} not in field", field),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
192 -             format!("{} not in field", field),
192 +             format!("{field} not in field"),
    |

Check failure on line 177 in masp_primitives/src/transaction/components/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
   --> masp_primitives/src/transaction/components/sapling.rs:177:13
    |
177 |             format!("invalid {}", field),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
177 -             format!("invalid {}", field),
177 +             format!("invalid {field}"),
    |

Check failure on line 868 in masp_primitives/src/transaction/components/sapling/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

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

error: casting to the same type is unnecessary (`u64` -> `u64`)
   --> masp_primitives/src/transaction/components/sapling/builder.rs:868:41
    |
868 |                 arb_positive_note_value(MAX_MONEY as u64 / 10000).prop_flat_map(arb_note),
    |                                         ^^^^^^^^^^^^^^^^ help: try: `MAX_MONEY`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check failure on line 648 in masp_primitives/src/transaction/components/amount.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

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

error: casting to the same type is unnecessary (`i128` -> `i128`)
   --> masp_primitives/src/transaction/components/amount.rs:648:45
    |
648 |             ValueSum::from_pair(asset_type, amt as i128).unwrap()
    |                                             ^^^^^^^^^^^ help: try: `amt`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check failure on line 73 in masp_primitives/src/transaction/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
  --> masp_primitives/src/transaction/builder.rs:73:30
   |
73 |             Error::Fee(e) => write!(f, "An error occurred in fee calculation: {}", e),
   |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
73 -             Error::Fee(e) => write!(f, "An error occurred in fee calculation: {}", e),
73 +             Error::Fee(e) => write!(f, "An error occurred in fee calculation: {e}"),
   |

Check failure on line 72 in masp_primitives/src/transaction/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
  --> masp_primitives/src/transaction/builder.rs:72:34
   |
72 |             Error::Balance(e) => write!(f, "Invalid amount {:?}", e),
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
72 -             Error::Balance(e) => write!(f, "Invalid amount {:?}", e),
72 +             Error::Balance(e) => write!(f, "Invalid amount {e:?}"),
   |

Check failure on line 71 in masp_primitives/src/transaction/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
  --> masp_primitives/src/transaction/builder.rs:67:46
   |
67 |               Error::ChangeRequired(amount) => write!(
   |  ______________________________________________^
68 | |                 f,
69 | |                 "The transaction requires an additional change output of {:?} zatoshis",
70 | |                 amount
71 | |             ),
   | |_____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

Check failure on line 66 in masp_primitives/src/transaction/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
  --> masp_primitives/src/transaction/builder.rs:62:49
   |
62 |               Error::InsufficientFunds(amount) => write!(
   |  _________________________________________________^
63 | |                 f,
64 | |                 "Insufficient funds for transaction construction; need an additional {:?} zatoshis",
65 | |                 amount
66 | |             ),
   | |_____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

Check failure on line 827 in masp_primitives/src/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

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

error: casting to the same type is unnecessary (`u64` -> `u64`)
   --> masp_primitives/src/sapling.rs:827:63
    |
827 |         fn note_serialization(note in arb_positive_note_value(MAX_MONEY as u64).prop_flat_map(arb_note)) {
    |                                                               ^^^^^^^^^^^^^^^^ help: try: `MAX_MONEY`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check failure on line 768 in masp_primitives/src/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

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

error: casting to the same type is unnecessary (`u64` -> `u64`)
   --> masp_primitives/src/sapling.rs:768:41
    |
768 |             value in 1u64..=(min(bound, MAX_MONEY as u64))
    |                                         ^^^^^^^^^^^^^^^^ help: try: `MAX_MONEY`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check failure on line 760 in masp_primitives/src/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

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

error: casting to the same type is unnecessary (`u64` -> `u64`)
   --> masp_primitives/src/sapling.rs:760:49
    |
760 |         pub fn arb_note_value()(value in 0u64..=MAX_MONEY as u64) -> NoteValue {
    |                                                 ^^^^^^^^^^^^^^^^ help: try: `MAX_MONEY`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check failure on line 539 in masp_primitives/src/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

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

error: casting to the same type is unnecessary (`u64` -> `u64`)
   --> masp_primitives/src/sapling.rs:539:21
    |
539 |         if value <= MAX_MONEY as u64 {
    |                     ^^^^^^^^^^^^^^^^ help: try: `MAX_MONEY`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    = note: `-D clippy::unnecessary-cast` implied by `-D warnings`

Check failure on line 488 in masp_primitives/src/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

useless conversion to the same type: `[u8; 43]`

error: useless conversion to the same type: `[u8; 43]`
   --> masp_primitives/src/sapling.rs:488:41
    |
488 |         let res = Self::from_bytes(&mut data.try_into().unwrap());
    |                                         ^^^^^^^^^^^^^^^
    |
    = help: consider removing `.try_into()`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `-D clippy::useless-conversion` implied by `-D warnings`

Check failure on line 488 in masp_primitives/src/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

the function `Self::from_bytes` doesn't need a mutable reference

error: the function `Self::from_bytes` doesn't need a mutable reference
   --> masp_primitives/src/sapling.rs:488:36
    |
488 |         let res = Self::from_bytes(&mut data.try_into().unwrap());
    |                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
    = note: `-D clippy::unnecessary-mut-passed` implied by `-D warnings`

Check failure on line 222 in masp_primitives/src/sapling/redjubjub.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

the following explicit lifetimes could be elided: 'a

error: the following explicit lifetimes could be elided: 'a
   --> masp_primitives/src/sapling/redjubjub.rs:218:1
    |
218 | / pub fn batch_verify<'a, R: RngCore>(
219 | |     mut rng: &mut R,
220 | |     batch: &[BatchEntry<'a>],
221 | |     p_g: SubgroupPoint,
222 | | ) -> bool {
    | |_________^
    |
help: replace with `'_` in generic arguments such as here
   --> masp_primitives/src/sapling/redjubjub.rs:220:25
    |
220 |     batch: &[BatchEntry<'a>],
    |                         ^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `-D clippy::needless-lifetimes` implied by `-D warnings`

Check failure on line 43 in masp_primitives/src/memo.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
  --> masp_primitives/src/memo.rs:43:34
   |
43 |             Error::TooLong(n) => write!(f, "Memo length {} is larger than maximum of 512", n),
   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
43 -             Error::TooLong(n) => write!(f, "Memo length {} is larger than maximum of 512", n),
43 +             Error::TooLong(n) => write!(f, "Memo length {n} is larger than maximum of 512"),
   |

Check failure on line 42 in masp_primitives/src/memo.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
  --> masp_primitives/src/memo.rs:42:38
   |
42 |             Error::InvalidUtf8(e) => write!(f, "Invalid UTF-8: {}", e),
   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
42 -             Error::InvalidUtf8(e) => write!(f, "Invalid UTF-8: {}", e),
42 +             Error::InvalidUtf8(e) => write!(f, "Invalid UTF-8: {e}"),
   |

Check failure on line 22 in masp_primitives/src/memo.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
  --> masp_primitives/src/memo.rs:22:9
   |
22 |         write!(f, "{:02x}", byte)?;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
22 -         write!(f, "{:02x}", byte)?;
22 +         write!(f, "{byte:02x}")?;
   |

Check failure on line 366 in masp_primitives/src/consensus.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
   --> masp_primitives/src/consensus.rs:363:22
    |
363 |                   _ => panic!(
    |  ______________________^
364 | |                     "{} should not be before {} in UPGRADES_IN_ORDER",
365 | |                     nu_a, nu_b
366 | |                 ),
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    = note: `-D clippy::uninlined-format-args` implied by `-D warnings`

Check failure on line 506 in masp_primitives/src/transaction/components/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

the borrowed expression implements the required traits

error: the borrowed expression implements the required traits
   --> masp_primitives/src/transaction/components/sapling.rs:506:29
    |
506 |         let cv = read_point(&mut reader, "cv")?;
    |                             ^^^^^^^^^^^ help: change this to: `reader`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-D clippy::needless-borrow` implied by `-D warnings`

Check failure on line 192 in masp_primitives/src/transaction/components/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
   --> masp_primitives/src/transaction/components/sapling.rs:192:13
    |
192 |             format!("{} not in field", field),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
192 -             format!("{} not in field", field),
192 +             format!("{field} not in field"),
    |

Check failure on line 177 in masp_primitives/src/transaction/components/sapling.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

variables can be used directly in the `format!` string

error: variables can be used directly in the `format!` string
   --> masp_primitives/src/transaction/components/sapling.rs:177:13
    |
177 |             format!("invalid {}", field),
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
177 -             format!("invalid {}", field),
177 +             format!("invalid {field}"),
    |

Check failure on line 868 in masp_primitives/src/transaction/components/sapling/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

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

error: casting to the same type is unnecessary (`u64` -> `u64`)
   --> masp_primitives/src/transaction/components/sapling/builder.rs:868:41
    |
868 |                 arb_positive_note_value(MAX_MONEY as u64 / 10000).prop_flat_map(arb_note),
    |                                         ^^^^^^^^^^^^^^^^ help: try: `MAX_MONEY`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check failure on line 648 in masp_primitives/src/transaction/components/amount.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (MSRV)

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

error: casting to the same type is unnecessary (`i128` -> `i128`)
   --> masp_primitives/src/transaction/components/amount.rs:648:45
    |
648 |             ValueSum::from_pair(asset_type, amt as i128).unwrap()
    |                                             ^^^^^^^^^^^ help: try: `amt`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast