Skip to content

fix: fix sub tree prefix and go to version 2.2.1 #697

fix: fix sub tree prefix and go to version 2.2.1

fix: fix sub tree prefix and go to version 2.2.1 #697

GitHub Actions / clippy failed Jan 14, 2025 in 0s

clippy

7 errors, 11 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 7
Warning 11
Note 0
Help 0

Versions

  • rustc 1.84.0 (9fc6b4312 2025-01-07)
  • cargo 1.84.0 (66221abde 2024-11-19)
  • clippy 0.1.84 (9fc6b43126 2025-01-07)

Annotations

Check failure on line 525 in storage/src/rocksdb_storage/storage.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

mismatched types

error[E0308]: mismatched types
   --> storage/src/rocksdb_storage/storage.rs:524:9
    |
523 |       ) -> CostContext<Self::ImmediateStorageContext> {
    |            ------------------------------------------ expected `grovedb_costs::CostContext<rocksdb_storage::storage_context::context_immediate::PrefixedRocksDbImmediateStorageContext<'db>>` because of return type
524 | /         PrefixedRocksDbImmediateStorageContext::new(&self.db, transaction, prefix)
525 | |             .wrap_with_cost(OperationCost::default())
    | |_____________________________________________________^ expected `CostContext<PrefixedRocksDbImmediateStorageContext<'_>>`, found `CostContext<&...>`
    |
    = note: expected struct `grovedb_costs::CostContext<rocksdb_storage::storage_context::context_immediate::PrefixedRocksDbImmediateStorageContext<'db>>`
               found struct `grovedb_costs::CostContext<&rocksdb_storage::storage_context::context_immediate::PrefixedRocksDbImmediateStorageContext<'_>>`

Check failure on line 43 in storage/src/rocksdb_storage/storage_context.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type alias import `SubtreePrefix` is private

error[E0603]: type alias import `SubtreePrefix` is private
  --> storage/src/rocksdb_storage/storage_context.rs:43:21
   |
43 | use super::storage::SubtreePrefix;
   |                     ^^^^^^^^^^^^^ private type alias import
   |
note: the type alias import `SubtreePrefix` is defined here...
  --> storage/src/rocksdb_storage/storage.rs:54:39
   |
54 |     storage::{AbstractBatchOperation, SubtreePrefix},
   |                                       ^^^^^^^^^^^^^
note: ...and refers to the type alias `SubtreePrefix` which is defined here
  --> storage/src/storage.rs:45:1
   |
45 | pub type SubtreePrefix = [u8; 32];
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ you could import this directly
help: import `SubtreePrefix` through the re-export
   |
43 | use storage::SubtreePrefix;
   |     ~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 36 in storage/src/rocksdb_storage/storage_context/raw_iterator.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type alias import `SubtreePrefix` is private

error[E0603]: type alias import `SubtreePrefix` is private
  --> storage/src/rocksdb_storage/storage_context/raw_iterator.rs:36:36
   |
36 |     rocksdb_storage::storage::{Db, SubtreePrefix, Tx},
   |                                    ^^^^^^^^^^^^^ private type alias import
   |
note: the type alias import `SubtreePrefix` is defined here...
  --> storage/src/rocksdb_storage/storage.rs:54:39
   |
54 |     storage::{AbstractBatchOperation, SubtreePrefix},
   |                                       ^^^^^^^^^^^^^
note: ...and refers to the type alias `SubtreePrefix` which is defined here
  --> storage/src/storage.rs:45:1
   |
45 | pub type SubtreePrefix = [u8; 32];
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ you could import this directly
help: import `SubtreePrefix` through the re-export
   |
36 |     rocksdb_storage::storage::{Db, storage::SubtreePrefix, Tx},
   |                                    ~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 42 in storage/src/rocksdb_storage/storage_context/context_tx.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type alias import `SubtreePrefix` is private

error[E0603]: type alias import `SubtreePrefix` is private
  --> storage/src/rocksdb_storage/storage_context/context_tx.rs:42:36
   |
42 |     rocksdb_storage::storage::{Db, SubtreePrefix, Tx, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME},
   |                                    ^^^^^^^^^^^^^ private type alias import
   |
note: the type alias import `SubtreePrefix` is defined here...
  --> storage/src/rocksdb_storage/storage.rs:54:39
   |
54 |     storage::{AbstractBatchOperation, SubtreePrefix},
   |                                       ^^^^^^^^^^^^^
note: ...and refers to the type alias `SubtreePrefix` which is defined here
  --> storage/src/storage.rs:45:1
   |
45 | pub type SubtreePrefix = [u8; 32];
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ you could import this directly
help: import `SubtreePrefix` through the re-export
   |
42 |     rocksdb_storage::storage::{Db, storage::SubtreePrefix, Tx, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME},
   |                                    ~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 42 in storage/src/rocksdb_storage/storage_context/context_no_tx.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type alias import `SubtreePrefix` is private

error[E0603]: type alias import `SubtreePrefix` is private
  --> storage/src/rocksdb_storage/storage_context/context_no_tx.rs:42:36
   |
42 |     rocksdb_storage::storage::{Db, SubtreePrefix, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME},
   |                                    ^^^^^^^^^^^^^ private type alias import
   |
note: the type alias import `SubtreePrefix` is defined here...
  --> storage/src/rocksdb_storage/storage.rs:54:39
   |
54 |     storage::{AbstractBatchOperation, SubtreePrefix},
   |                                       ^^^^^^^^^^^^^
note: ...and refers to the type alias `SubtreePrefix` which is defined here
  --> storage/src/storage.rs:45:1
   |
45 | pub type SubtreePrefix = [u8; 32];
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ you could import this directly
help: import `SubtreePrefix` through the re-export
   |
42 |     rocksdb_storage::storage::{Db, storage::SubtreePrefix, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME},
   |                                    ~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 42 in storage/src/rocksdb_storage/storage_context/context_immediate.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type alias import `SubtreePrefix` is private

error[E0603]: type alias import `SubtreePrefix` is private
  --> storage/src/rocksdb_storage/storage_context/context_immediate.rs:42:36
   |
42 |     rocksdb_storage::storage::{Db, SubtreePrefix, Tx, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME},
   |                                    ^^^^^^^^^^^^^ private type alias import
   |
note: the type alias import `SubtreePrefix` is defined here...
  --> storage/src/rocksdb_storage/storage.rs:54:39
   |
54 |     storage::{AbstractBatchOperation, SubtreePrefix},
   |                                       ^^^^^^^^^^^^^
note: ...and refers to the type alias `SubtreePrefix` which is defined here
  --> storage/src/storage.rs:45:1
   |
45 | pub type SubtreePrefix = [u8; 32];
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ you could import this directly
help: import `SubtreePrefix` through the re-export
   |
42 |     rocksdb_storage::storage::{Db, storage::SubtreePrefix, Tx, AUX_CF_NAME, META_CF_NAME, ROOTS_CF_NAME},
   |                                    ~~~~~~~~~~~~~~~~~~~~~~

Check failure on line 10 in storage/src/rocksdb_storage/storage_context/batch.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type alias import `SubtreePrefix` is private

error[E0603]: type alias import `SubtreePrefix` is private
  --> storage/src/rocksdb_storage/storage_context/batch.rs:10:42
   |
10 | pub use crate::rocksdb_storage::storage::SubtreePrefix;
   |                                          ^^^^^^^^^^^^^ private type alias import
   |
note: the type alias import `SubtreePrefix` is defined here...
  --> storage/src/rocksdb_storage/storage.rs:54:39
   |
54 |     storage::{AbstractBatchOperation, SubtreePrefix},
   |                                       ^^^^^^^^^^^^^
note: ...and refers to the type alias `SubtreePrefix` which is defined here
  --> storage/src/storage.rs:45:1
   |
45 | pub type SubtreePrefix = [u8; 32];
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ you could import this directly
help: import `SubtreePrefix` through the re-export
   |
10 | pub use storage::SubtreePrefix;
   |         ~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 150 in path/src/subtree_path_iter.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
   --> path/src/subtree_path_iter.rs:150:6
    |
150 | impl<'b, B> Clone for CurrentSubtreePathIter<'b, B> {
    |      ^^                                      ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
150 - impl<'b, B> Clone for CurrentSubtreePathIter<'b, B> {
150 + impl<B> Clone for CurrentSubtreePathIter<'_, B> {
    |

Check warning on line 45 in path/src/subtree_path_iter.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> path/src/subtree_path_iter.rs:45:6
   |
45 | impl<'b, B> Clone for SubtreePathIter<'b, B> {
   |      ^^                               ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
45 - impl<'b, B> Clone for SubtreePathIter<'b, B> {
45 + impl<B> Clone for SubtreePathIter<'_, B> {
   |

Check warning on line 88 in path/src/subtree_path_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> path/src/subtree_path_builder.rs:88:6
   |
88 | impl<'b, B: AsRef<[u8]>> Eq for SubtreePathBuilder<'b, B> {}
   |      ^^                                            ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
88 - impl<'b, B: AsRef<[u8]>> Eq for SubtreePathBuilder<'b, B> {}
88 + impl<B: AsRef<[u8]>> Eq for SubtreePathBuilder<'_, B> {}
   |

Check warning on line 78 in path/src/subtree_path_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'bl

warning: the following explicit lifetimes could be elided: 'bl
  --> path/src/subtree_path_builder.rs:78:6
   |
78 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'bl, BL>
   |      ^^^                                                                      ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
78 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'bl, BL>
78 + impl<'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'_, BL>
   |

Check warning on line 68 in path/src/subtree_path_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'bl

warning: the following explicit lifetimes could be elided: 'bl
  --> path/src/subtree_path_builder.rs:68:6
   |
68 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL>
   |      ^^^                                                                      ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
68 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL>
68 + impl<'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'_, BL>
   |

Check warning on line 58 in path/src/subtree_path_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'bl

warning: the following explicit lifetimes could be elided: 'bl
  --> path/src/subtree_path_builder.rs:58:6
   |
58 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'bl, BL>
   |      ^^^                                                                             ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
58 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'bl, BL>
58 + impl<'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'_, BL>
   |

Check warning on line 51 in path/src/subtree_path_builder.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> path/src/subtree_path_builder.rs:51:6
   |
51 | impl<'b, B: AsRef<[u8]>> Hash for SubtreePathBuilder<'b, B> {
   |      ^^                                              ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
51 - impl<'b, B: AsRef<[u8]>> Hash for SubtreePathBuilder<'b, B> {
51 + impl<B: AsRef<[u8]>> Hash for SubtreePathBuilder<'_, B> {
   |

Check warning on line 111 in path/src/subtree_path.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
   --> path/src/subtree_path.rs:111:6
    |
111 | impl<'b, B: AsRef<[u8]>> Hash for SubtreePath<'b, B> {
    |      ^^                                       ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
111 - impl<'b, B: AsRef<[u8]>> Hash for SubtreePath<'b, B> {
111 + impl<B: AsRef<[u8]>> Hash for SubtreePath<'_, B> {
    |

Check warning on line 81 in path/src/subtree_path.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'b

warning: the following explicit lifetimes could be elided: 'b
  --> path/src/subtree_path.rs:81:6
   |
81 | impl<'b, B: AsRef<[u8]>> Eq for SubtreePath<'b, B> {}
   |      ^^                                     ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
81 - impl<'b, B: AsRef<[u8]>> Eq for SubtreePath<'b, B> {}
81 + impl<B: AsRef<[u8]>> Eq for SubtreePath<'_, B> {}
   |

Check warning on line 69 in path/src/subtree_path.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'bl

warning: the following explicit lifetimes could be elided: 'bl
  --> path/src/subtree_path.rs:69:6
   |
69 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'bl, BL>
   |      ^^^                                                               ^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
   = note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
   |
69 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'bl, BL>
69 + impl<'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'_, BL>
   |

Check warning on line 173 in costs/src/context.rs

See this annotation in the file changed.

@github-actions 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
    |     +++