solana-trie: add support for witness account #1731
clippy
6 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 6 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0-nightly (268dbbbc4 2024-02-04)
- cargo 1.78.0-nightly (7bb7b5395 2024-01-20)
- clippy 0.1.77 (268dbbb 2024-02-04)
Annotations
Check failure on line 160 in solana/trie/src/lib.rs
github-actions / clippy
deref on an immutable reference
error: deref on an immutable reference
--> solana/trie/src/lib.rs:160:40
|
160 | let root: &witness::Data = &*witness;
| ^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
= note: `-D clippy::borrow-deref-ref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::borrow_deref_ref)]`
help: if you would like to reborrow, try removing `&*`
|
160 | let root: &witness::Data = witness;
| ~~~~~~~
help: if you would like to deref, try using `&**`
|
160 | let root: &witness::Data = &**witness;
| ~~~~~~~~~~
Check failure on line 150 in solana/trie/src/lib.rs
github-actions / clippy
this lifetime isn't used in the impl
error: this lifetime isn't used in the impl
--> solana/trie/src/lib.rs:150:10
|
150 | impl<'a, 'info, D: DataRef> core::ops::DerefMut for TrieAccount<'a, D> {
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 145 in solana/trie/src/lib.rs
github-actions / clippy
this lifetime isn't used in the impl
error: this lifetime isn't used in the impl
--> solana/trie/src/lib.rs:145:10
|
145 | impl<'a, 'info, D: DataRef> core::ops::Deref for TrieAccount<'a, D> {
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
Check failure on line 118 in solana/trie/src/lib.rs
github-actions / clippy
this lifetime isn't used in the impl
error: this lifetime isn't used in the impl
--> solana/trie/src/lib.rs:118:10
|
118 | impl<'a, 'info, D: DataRef + Sized> core::ops::Drop for TrieAccount<'a, D> {
| ^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
= note: `-D clippy::extra-unused-lifetimes` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::extra_unused_lifetimes)]`
Check failure on line 64 in solana/trie/src/witness.rs
github-actions / clippy
this call to `as_mut` does nothing
error: this call to `as_mut` does nothing
--> solana/trie/src/witness.rs:64:35
|
64 | let data: &mut [u8] = data.as_mut();
| ^^^^^^^^^^^^^ help: try: `data`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref
= note: `-D clippy::useless-asref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::useless_asref)]`
Check failure on line 60 in solana/trie/src/witness.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'info
error: the following explicit lifetimes could be elided: 'info
--> solana/trie/src/witness.rs:60:41
|
60 | pub(crate) fn from_account_info<'a, 'info>(
| ^^^^^
61 | witness: &'a AccountInfo<'info>,
| ^^^^^
|
= 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`
= help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
|
60 ~ pub(crate) fn from_account_info<'a>(
61 ~ witness: &'a AccountInfo<'_>,
|