feat: added a convenience method that will return an existing item du… #382
clippy
25 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 25 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.81.0 (eeb90cda1 2024-09-04)
- cargo 1.81.0 (2dbb1af80 2024-08-20)
- clippy 0.1.81 (eeb90cd 2024-09-04)
Annotations
Check warning on line 423 in merk/src/estimated_costs/average_case_costs.rs
github-actions / clippy
casting to the same type is unnecessary (`u32` -> `u32`)
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> merk/src/estimated_costs/average_case_costs.rs:423:24
|
423 | cost.seek_count += nodes_updated as u32;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `nodes_updated`
|
= 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 49 in merk/src/estimated_costs/average_case_costs.rs
github-actions / clippy
duplicated attribute
warning: duplicated attribute
--> merk/src/estimated_costs/average_case_costs.rs:49:7
|
49 | #[cfg(feature = "full")]
| ^^^^^^^^^^^^^^^^
|
note: first defined here
--> merk/src/estimated_costs/average_case_costs.rs:48:7
|
48 | #[cfg(feature = "full")]
| ^^^^^^^^^^^^^^^^
help: remove this attribute
--> merk/src/estimated_costs/average_case_costs.rs:49:7
|
49 | #[cfg(feature = "full")]
| ^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duplicated_attributes
= note: `#[warn(clippy::duplicated_attributes)]` on by default
Check warning on line 877 in merk/src/tree/mod.rs
github-actions / clippy
this function has too many arguments (9/7)
warning: this function has too many arguments (9/7)
--> merk/src/tree/mod.rs:850:5
|
850 | / pub fn put_value_with_reference_value_hash_and_value_cost(
851 | | mut self,
852 | | value: Vec<u8>,
853 | | value_hash: CryptoHash,
... |
876 | | >,
877 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 818 in merk/src/tree/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:792:5
|
792 | / pub fn put_value_and_reference_value_hash(
793 | | mut self,
794 | | value: Vec<u8>,
795 | | value_hash: CryptoHash,
... |
817 | | >,
818 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 762 in merk/src/tree/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:736:5
|
736 | / pub fn put_value_with_fixed_cost(
737 | | mut self,
738 | | value: Vec<u8>,
739 | | value_fixed_cost: u32,
... |
761 | | >,
762 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 368 in merk/src/tree/walk/mod.rs
github-actions / clippy
this function has too many arguments (9/7)
warning: this function has too many arguments (9/7)
--> merk/src/tree/walk/mod.rs:341:5
|
341 | / pub fn put_value_with_reference_value_hash_and_value_cost(
342 | | mut self,
343 | | value: Vec<u8>,
344 | | value_hash: CryptoHash,
... |
367 | | >,
368 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 321 in merk/src/tree/walk/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/tree/walk/mod.rs:295:5
|
295 | / pub fn put_value_and_reference_value_hash(
296 | | mut self,
297 | | value: Vec<u8>,
298 | | value_hash: CryptoHash,
... |
320 | | >,
321 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 275 in merk/src/tree/walk/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/tree/walk/mod.rs:249:5
|
249 | / pub fn put_value_with_fixed_cost(
250 | | mut self,
251 | | value: Vec<u8>,
252 | | value_fixed_cost: u32,
... |
274 | | >,
275 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 745 in merk/src/tree/ops.rs
github-actions / clippy
this function has too many arguments (11/7)
warning: this function has too many arguments (11/7)
--> merk/src/tree/ops.rs:733:5
|
733 | / fn recurse<K: AsRef<[u8]>, C, V, T, U, R>(
734 | | self,
735 | | batch: &MerkBatch<K>,
736 | | mid: usize,
... |
744 | | grove_version: &GroveVersion,
745 | | ) -> CostResult<(Option<Self>, KeyUpdates), Error>
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 424 in merk/src/tree/ops.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/tree/ops.rs:415:5
|
415 | / fn apply_sorted<K: AsRef<[u8]>, C, V, T, U, R>(
416 | | self,
417 | | batch: &MerkBatch<K>,
418 | | old_specialized_cost: &C,
... |
423 | | grove_version: &GroveVersion,
424 | | ) -> CostResult<(Option<Self>, KeyUpdates), Error>
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 244 in merk/src/tree/ops.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/tree/ops.rs:235:5
|
235 | / fn build<K: AsRef<[u8]>, C, V, T, U, R>(
236 | | batch: &MerkBatch<K>,
237 | | source: S,
238 | | old_tree_cost: &C,
... |
243 | | grove_version: &GroveVersion,
244 | | ) -> CostResult<Option<TreeNode>, Error>
| |____________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 158 in merk/src/tree/ops.rs
github-actions / clippy
this function has too many arguments (9/7)
warning: this function has too many arguments (9/7)
--> merk/src/tree/ops.rs:148:5
|
148 | / pub fn apply_to<K: AsRef<[u8]>, C, V, T, U, R>(
149 | | maybe_tree: Option<Self>,
150 | | batch: &MerkBatch<K>,
151 | | source: S,
... |
157 | | grove_version: &GroveVersion,
158 | | ) -> CostContext<Result<(Option<TreeNode>, KeyUpdates), Error>>
| |___________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 5 in merk/src/proofs/chunk.rs
github-actions / clippy
module has the same name as its containing module
warning: module has the same name as its containing module
--> merk/src/proofs/chunk.rs:5:1
|
5 | pub mod chunk;
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
= note: `#[warn(clippy::module_inception)]` on by default
Check warning on line 665 in merk/src/merk/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/merk/mod.rs:656:5
|
656 | / fn verify_link(
657 | | &self,
658 | | link: &Link,
659 | | parent_key: &[u8],
... |
664 | | grove_version: &GroveVersion,
665 | | ) {
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 596 in merk/src/merk/mod.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/mod.rs:596:10
|
596 | ) -> (BTreeMap<Vec<u8>, CryptoHash>, BTreeMap<Vec<u8>, Vec<u8>>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 332 in merk/src/merk/apply.rs
github-actions / clippy
this function has too many arguments (10/7)
warning: this function has too many arguments (10/7)
--> merk/src/merk/apply.rs:321:5
|
321 | / pub fn apply_unchecked<KB, KA, C, V, T, U, R>(
322 | | &mut self,
323 | | batch: &MerkBatch<KB>,
324 | | aux: &AuxMerkBatch<KA>,
... |
331 | | grove_version: &GroveVersion,
332 | | ) -> CostResult<(), Error>
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 235 in merk/src/merk/apply.rs
github-actions / clippy
this function has too many arguments (10/7)
warning: this function has too many arguments (10/7)
--> merk/src/merk/apply.rs:205:5
|
205 | / pub fn apply_with_costs_just_in_time_value_update<KB, KA>(
206 | | &mut self,
207 | | batch: &MerkBatch<KB>,
208 | | aux: &AuxMerkBatch<KA>,
... |
234 | | grove_version: &GroveVersion,
235 | | ) -> CostResult<(), Error>
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 393 in merk/src/merk/chunks.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/chunks.rs:393:10
|
393 | ) -> Option<Result<(Vec<Op>, Option<Vec<u8>>), Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 363 in merk/src/merk/chunks.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/chunks.rs:363:10
|
363 | ) -> Option<Result<(Vec<Op>, Option<Vec<u8>>), Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
Check warning on line 390 in merk/src/tree/ops.rs
github-actions / clippy
method `apply_sorted_without_costs` is never used
warning: method `apply_sorted_without_costs` is never used
--> merk/src/tree/ops.rs:390:19
|
139 | / impl<S> Walker<S>
140 | | where
141 | | S: Fetch + Sized + Clone,
| |_____________________________- method in this implementation
...
390 | pub(crate) fn apply_sorted_without_costs<K: AsRef<[u8]>>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 412 in merk/src/merk/restore.rs
github-actions / clippy
method `attempt_state_recovery` is never used
warning: method `attempt_state_recovery` is never used
--> merk/src/merk/restore.rs:412:8
|
67 | impl<'db, S: StorageContext<'db>> Restorer<S> {
| --------------------------------------------- method in this implementation
...
412 | fn attempt_state_recovery(&mut self, grove_version: &GroveVersion) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 3 in merk/src/tree/fuzz_tests.rs
github-actions / clippy
unexpected `cfg` condition name: `tests`
warning: unexpected `cfg` condition name: `tests`
--> merk/src/tree/fuzz_tests.rs:3:8
|
3 | #![cfg(tests)]
| ^^^^^ help: there is a config with a similar name: `test`
|
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tests)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tests)");` to the top of the `build.rs`
= 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 214 in storage/src/rocksdb_storage/storage_context/raw_iterator.rs
github-actions / clippy
using `map` over `inspect`
warning: using `map` over `inspect`
--> storage/src/rocksdb_storage/storage_context/raw_iterator.rs:214:39
|
214 | self.raw_iterator.value().map(|v| {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
help: try
|
214 ~ self.raw_iterator.value().inspect(|v| {
215 ~ cost.storage_loaded_bytes += v.len() as u64;
|
Check warning on line 93 in storage/src/rocksdb_storage/storage_context/raw_iterator.rs
github-actions / clippy
using `map` over `inspect`
warning: using `map` over `inspect`
--> storage/src/rocksdb_storage/storage_context/raw_iterator.rs:93:39
|
93 | self.raw_iterator.value().map(|v| {
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect
= note: `#[warn(clippy::manual_inspect)]` on by default
help: try
|
93 ~ self.raw_iterator.value().inspect(|v| {
94 ~ cost.storage_loaded_bytes += v.len() as u64;
|
Check warning on line 173 in costs/src/context.rs
github-actions / clippy
doc list item without indentation
warning: doc list item without indentation
--> costs/src/context.rs:173:5
|
173 | /// accumulator; 4. Early termination uses external cost accumulator so previous
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `#[warn(clippy::doc_lazy_continuation)]` on by default
help: indent this line
|
173 | /// accumulator; 4. Early termination uses external cost accumulator so previous
| +++