Skip to content

Remove commented test #612

Remove commented test

Remove commented test #612

Triggered via push November 23, 2023 19:17
Status Success
Total duration 12m 23s
Artifacts

test.yml

on: push
Matrix: build-and-test
Fit to window
Zoom out
Zoom in

Annotations

243 warnings
writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do: src/structure/wavelettree.rs#L266
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do --> src/structure/wavelettree.rs:266:54 | 266 | fn push_to_fragments(num: u64, width: u8, fragments: &mut Vec<FragmentBuilder>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut [FragmentBuilder]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/wavelettree.rs#L171
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/wavelettree.rs:171:32 | 171 | let mut alphabet_end = 2_u64.pow(self.num_layers as u32) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `2_u64.pow(self.num_layers as u32)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/wavelettree.rs#L125
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/wavelettree.rs:125:32 | 125 | let mut alphabet_end = 2_u64.pow(self.num_layers as u32) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `2_u64.pow(self.num_layers as u32)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
struct `WaveletTree` has a public `len` method, but no `is_empty` method: src/structure/wavelettree.rs#L101
warning: struct `WaveletTree` has a public `len` method, but no `is_empty` method --> src/structure/wavelettree.rs:101:5 | 101 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
struct `WaveletLookup` has a public `len` method, but no `is_empty` method: src/structure/wavelettree.rs#L43
warning: struct `WaveletLookup` has a public `len` method, but no `is_empty` method --> src/structure/wavelettree.rs:43:5 | 43 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
this expression creates a reference which is immediately dereferenced by the compiler: src/structure/util.rs#L43
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/structure/util.rs:43:17 | 43 | w.write_all(&bytes).await?; | ^^^^^^ help: change this to: `bytes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/tfc/typed.rs#L482
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/tfc/typed.rs:482:23 | 482 | .push(block_offset_builder.count() as u64 - 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `block_offset_builder.count()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`: src/structure/tfc/typed.rs#L472
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` --> src/structure/tfc/typed.rs:472:13 | 472 | / self.sized_dict_buf_builder 473 | | .as_mut() 474 | | .map(|b| b.record_size = value.datatype.record_size()); | |______________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn = note: `#[warn(clippy::option_map_unit_fn)]` on by default help: try | 472 ~ if let Some(b) = self.sized_dict_buf_builder 473 + .as_mut() { ... } |
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/typed.rs#L398
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/typed.rs:398:5 | 398 | / pub fn into_iter(self) -> impl Iterator<Item = SizedDictEntry> + Clone { 399 | | self.0.into_iter() 400 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L394
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:394:17 | 394 | pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 394 - pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { 394 + pub fn iter(&self) -> impl Iterator<Item = SizedDictEntry> + '_ + Clone { |
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/typed.rs#L365
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/typed.rs:365:5 | 365 | / pub fn into_iter(self) -> impl Iterator<Item = SizedDictEntry> + Clone { 366 | | self.dict.into_iter() 367 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L361
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:361:17 | 361 | pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 361 - pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { 361 + pub fn iter(&self) -> impl Iterator<Item = SizedDictEntry> + '_ + Clone { |
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/typed.rs#L299
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/typed.rs:299:5 | 299 | / pub fn into_iter(self) -> impl Iterator<Item = TypedDictEntry> + Clone { 300 | | self.into_block_iter().flat_map(|(datatype, segment)| { 301 | | segment 302 | | .into_iter() 303 | | .map(move |entry| TypedDictEntry::new(datatype, entry)) 304 | | }) 305 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L291
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:291:17 | 291 | pub fn iter<'a>(&'a self) -> impl Iterator<Item = TypedDictEntry> + 'a + Clone { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 291 - pub fn iter<'a>(&'a self) -> impl Iterator<Item = TypedDictEntry> + 'a + Clone { 291 + pub fn iter(&self) -> impl Iterator<Item = TypedDictEntry> + '_ + Clone { |
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L273
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:273:23 | 273 | pub fn block_iter<'a>( | ^^ 274 | &'a self, | ^^ 275 | ) -> impl Iterator<Item = (Datatype, SizedDictBlock)> + 'a + Clone { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 273 ~ pub fn block_iter( 274 ~ &self, 275 ~ ) -> impl Iterator<Item = (Datatype, SizedDictBlock)> + '_ + Clone { |
this expression creates a reference which is immediately dereferenced by the compiler: src/structure/tfc/typed.rs#L261
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/structure/tfc/typed.rs:261:33 | 261 | dict: Cow::Borrowed(&self), | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L259
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:259:25 | 259 | pub fn segment_iter<'a>(&'a self) -> DictSegmentIterator<'a> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 259 - pub fn segment_iter<'a>(&'a self) -> DictSegmentIterator<'a> { 259 + pub fn segment_iter(&self) -> DictSegmentIterator<'_> { |
manual implementation of `Option::map`: src/structure/tfc/typed.rs#L207
warning: manual implementation of `Option::map` --> src/structure/tfc/typed.rs:207:9 | 207 | / if let Some(i) = self.types_present.index_of(dt as u64) { 208 | | Some(self.inner_type_segment(i)) 209 | | } else { 210 | | None 211 | | } | |_________^ help: try: `self.types_present.index_of(dt as u64).map(|i| self.inner_type_segment(i))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map = note: `#[warn(clippy::manual_map)]` on by default
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/tfc/typed.rs#L202
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/tfc/typed.rs:202:13 | 202 | id_offset as u64, | ^^^^^^^^^^^^^^^^ help: try: `id_offset` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`usize` -> `usize`): src/structure/tfc/typed.rs#L170
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/structure/tfc/typed.rs:170:53 | 170 | block_offset = self.block_offsets.entry(type_offset as usize) as usize; | ^^^^^^^^^^^^^^^^^^^^ help: try: `type_offset` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
very complex type used. Consider factoring parts into `type` definitions: src/structure/tfc/stream.rs#L23
warning: very complex type used. Consider factoring parts into `type` definitions --> src/structure/tfc/stream.rs:23:9 | 23 | / Pin< 24 | | Box< 25 | | dyn Future< 26 | | Output = Result< ... | 32 | | >, 33 | | >, | |_________^ | = 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
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/dict.rs#L241
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/dict.rs:241:5 | 241 | / pub fn into_iter(self) -> impl Iterator<Item = SizedDictEntry> + Clone { 242 | | self.into_block_iter().flat_map(|b| b.into_iter()) 243 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
the following explicit lifetimes could be elided: 'a: src/structure/tfc/dict.rs#L237
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/dict.rs:237:17 | 237 | pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 237 - pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { 237 + pub fn iter(&self) -> impl Iterator<Item = SizedDictEntry> + '_ + Clone { |
the following explicit lifetimes could be elided: 'a: src/structure/tfc/dict.rs#L223
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/dict.rs:223:23 | 223 | pub fn block_iter<'a>(&'a self) -> SizedDictBlockIterator<'a> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 223 - pub fn block_iter<'a>(&'a self) -> SizedDictBlockIterator<'a> { 223 + pub fn block_iter(&self) -> SizedDictBlockIterator<'_> { |
returning the result of a `let` binding from a block: src/structure/tfc/dict.rs#L220
warning: returning the result of a `let` binding from a block --> src/structure/tfc/dict.rs:220:9 | 207 | let result = block_id.offset(offset).default(offset - 1); | --------------------------------------------------------- unnecessary `let` binding ... 220 | result | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 207 ~ 208 | /* ... 219 | 220 ~ block_id.offset(offset).default(offset - 1) |
casting to the same type is unnecessary (`usize` -> `usize`): src/structure/tfc/dict.rs#L172
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/structure/tfc/dict.rs:172:26 | 172 | Some(block.entry(((index - 1) % 8) as usize)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((index - 1) % 8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`usize` -> `usize`): src/structure/tfc/dict.rs#L171
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/structure/tfc/dict.rs:171:32 | 171 | let block = self.block(((index - 1) / 8) as usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((index - 1) / 8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
unneeded late initialization: src/structure/tfc/dict.rs#L134
warning: unneeded late initialization --> src/structure/tfc/dict.rs:134:9 | 134 | let block_bytes; | ^^^^^^^^^^^^^^^^ created here 135 | block_bytes = self.data.slice(offset..); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init help: declare `block_bytes` here | 135 | let block_bytes = self.data.slice(offset..); | ~~~~~~~~~~~~~~~
unneeded late initialization: src/structure/tfc/dict.rs#L119
warning: unneeded late initialization --> src/structure/tfc/dict.rs:119:9 | 119 | let offset: usize; | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init help: declare `offset` here | 120 | let offset: usize = if block_index == 0 { | +++++++++++++++++++ help: remove the assignments from the branches | 121 ~ 0 122 | } else { 123 ~ (self.offsets.entry(block_index - 1) - self.dict_offset) as usize | help: add a semicolon after the `if` expression | 124 | }; | +
length comparison to zero: src/structure/tfc/dict.rs#L69
warning: length comparison to zero --> src/structure/tfc/dict.rs:69:12 | 69 | if self.current_block.len() > 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.current_block.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
binary comparison to literal `Option::None`: src/structure/tfc/block.rs#L803
warning: binary comparison to literal `Option::None` --> src/structure/tfc/block.rs:803:12 | 803 | if record_size == None { | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `record_size.is_none()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none
the loop variable `i` is only used to index `slices`: src/structure/tfc/block.rs#L796
warning: the loop variable `i` is only used to index `slices` --> src/structure/tfc/block.rs:796:14 | 796 | for i in 1..slices.len() { | ^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop = note: `#[warn(clippy::needless_range_loop)]` on by default help: consider using an iterator | 796 | for <item> in slices.iter().skip(1) { | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
casting to the same type is unnecessary (`u8` -> `u8`): src/structure/tfc/block.rs#L782
warning: casting to the same type is unnecessary (`u8` -> `u8`) --> src/structure/tfc/block.rs:782:16 | 782 | buf.put_u8(cw as u8); | ^^^^^^^^ help: try: `cw` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/block.rs#L644
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/block.rs:644:5 | 644 | / pub fn into_iter(self) -> OwnedSizedBlockIterator { 645 | | SizedBlockIterator { 646 | | header: Cow::Owned(self.header), 647 | | data: self.data.clone(), ... | 650 | | } 651 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait = note: `#[warn(clippy::should_implement_trait)]` on by default
the following explicit lifetimes could be elided: 'a: src/structure/tfc/block.rs#L635
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/block.rs:635:17 | 635 | pub fn iter<'a>(&'a self) -> SizedBlockIterator<'a> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 635 - pub fn iter<'a>(&'a self) -> SizedBlockIterator<'a> { 635 + pub fn iter(&self) -> SizedBlockIterator<'_> { |
`if` chain can be rewritten with `match`: src/structure/tfc/block.rs#L615
warning: `if` chain can be rewritten with `match` --> src/structure/tfc/block.rs:615:13 | 615 | / if *shared < common_prefix { 616 | | return IdLookupResult::Closest(ix as u64); 617 | | } else if *shared > common_prefix { 618 | | continue; 619 | | } | |_____________^ | = help: consider rewriting the `if` chain to use `cmp` and `match` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
the following explicit lifetimes could be elided: 'a: src/structure/tfc/block.rs#L586
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/block.rs:586:17 | 586 | fn suffixes<'a>(&'a self) -> impl Iterator<Item = Bytes> + 'a { | ^^ ^^ ^^ | = 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 | 586 - fn suffixes<'a>(&'a self) -> impl Iterator<Item = Bytes> + 'a { 586 + fn suffixes(&self) -> impl Iterator<Item = Bytes> + '_ { |
unneeded late initialization: src/structure/tfc/block.rs#L569
warning: unneeded late initialization --> src/structure/tfc/block.rs:569:13 | 569 | let slice; | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init help: declare `slice` here | 570 | let slice = if ix == 0 && start == 0 { | +++++++++++ help: remove the assignments from the branches | 572 ~ self.header.head.slice(..have_to_take) 573 | } else { 574 ~ self.data.slice(cur_offset..cur_offset + have_to_take) | help: add a semicolon after the `if` expression | 575 | }; | +
this expression creates a reference which is immediately dereferenced by the compiler: src/structure/tfc/block.rs#L406
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/structure/tfc/block.rs:406:42 | 406 | SizedDictEntry::Single(b) => &b, | ^^ help: change this to: `b` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
enum `SizedDictEntry` has a public `len` method, but no `is_empty` method: src/structure/tfc/block.rs#L230
warning: enum `SizedDictEntry` has a public `len` method, but no `is_empty` method --> src/structure/tfc/block.rs:230:5 | 230 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
binary comparison to literal `Option::None`: src/structure/tfc/block.rs#L120
warning: binary comparison to literal `Option::None` --> src/structure/tfc/block.rs:120:27 | 120 | let size = if record_size == None { | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `record_size.is_none()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none
binary comparison to literal `Option::None`: src/structure/tfc/block.rs#L84
warning: binary comparison to literal `Option::None` --> src/structure/tfc/block.rs:84:27 | 84 | let size = if record_size == None { | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `record_size.is_none()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none = note: `#[warn(clippy::partialeq_to_none)]` on by default
useless conversion to the same type: `u64`: src/structure/logarray.rs#L490
warning: useless conversion to the same type: `u64` --> src/structure/logarray.rs:490:12 | 490 | if u64::from(self.count) * u64::from(self.width) & 0b11_1111 != 0 { | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `u64::from()`: `self.count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `u32`: src/structure/logarray.rs#L449
warning: useless conversion to the same type: `u32` --> src/structure/logarray.rs:449:34 | 449 | if val.leading_zeros() < u32::from(leading_zeros) { | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `u32::from()`: `leading_zeros` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
returning the result of a `let` binding from a block: src/structure/logarray.rs#L259
warning: returning the result of a `let` binding from a block --> src/structure/logarray.rs:259:5 | 257 | let num_bytes = num_u64 * 8; | ---------------------------- unnecessary `let` binding 258 | 259 | num_bytes | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 257 ~ 258 | 259 ~ num_u64 * 8 |
this loop could be written as a `for` loop: src/structure/bitindex.rs#L454
warning: this loop could be written as a `for` loop --> src/structure/bitindex.rs:454:5 | 454 | while let Some(chunk) = iter.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for chunk in iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/bitindex.rs#L246
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/bitindex.rs:246:33 | 246 | return Some(i as u64); | ^^^^^^^^ help: try: `i` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
struct `BitIndex` has a public `len` method, but no `is_empty` method: src/structure/bitindex.rs#L65
warning: struct `BitIndex` has a public `len` method, but no `is_empty` method --> src/structure/bitindex.rs:65:5 | 65 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty = note: `#[warn(clippy::len_without_is_empty)]` on by default
this loop could be written as a `for` loop: src/structure/bitarray.rs#L241
warning: this loop could be written as a `for` loop --> src/structure/bitarray.rs:241:9 | 241 | while let Some(bit) = iter.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for bit in iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
this loop could be written as a `for` loop: src/structure/adjacencylist.rs#L291
warning: this loop could be written as a `for` loop --> src/structure/adjacencylist.rs:291:9 | 291 | while let Some((left, right)) = iter.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for (left, right) in iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
unneeded `return` statement: src/store/mod.rs#L138
warning: unneeded `return` statement --> src/store/mod.rs:138:17 | 138 | / return Err(io::Error::new( 139 | | io::ErrorKind::InvalidData, 140 | | "builder has already been committed", 141 | | )) | |__________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 138 ~ Err(io::Error::new( 139 + io::ErrorKind::InvalidData, 140 + "builder has already been committed", 141 + )) |
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: src/storage/pack.rs#L171
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> src/storage/pack.rs:171:17 | 171 | layer_path: &PathBuf, | ^^^^^^^^ help: change this to: `&Path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: src/storage/pack.rs#L141
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> src/storage/pack.rs:141:17 | 141 | layer_path: &PathBuf, | ^^^^^^^^ help: change this to: `&Path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
you should consider adding a `Default` implementation for `MemoryBackedStore`: src/storage/memory.rs#L29
warning: you should consider adding a `Default` implementation for `MemoryBackedStore` --> src/storage/memory.rs:29:5 | 29 | / pub fn new() -> Self { 30 | | Self { 31 | | contents: Arc::new(RwLock::new(MemoryBackedStoreContents::Nonexistent)), 32 | | } 33 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 28 + impl Default for MemoryBackedStore { 29 + fn default() -> Self { 30 + Self::new() 31 + } 32 + } |
deref on an immutable reference: src/storage/delta.rs#L22
warning: deref on an immutable reference --> src/storage/delta.rs:22:17 | 22 | let mut l = &*layer; | ^^^^^^^ help: if you would like to reborrow, try removing `&*`: `layer` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref = note: `#[warn(clippy::borrow_deref_ref)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/storage/archive.rs#L1189
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/storage/archive.rs:1189:40 | 1189 | let rollup_id = string_to_name(&line)?; | ^^^^^ help: change this to: `line` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
called `skip(..).next()` on an iterator: src/storage/archive.rs#L1188
warning: called `skip(..).next()` on an iterator --> src/storage/archive.rs:1188:41 | 1188 | let line = rollup_string.lines().skip(1).next().unwrap(); | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next
redundant pattern matching, consider using `is_pending()`: src/storage/archive.rs#L1027
warning: redundant pattern matching, consider using `is_pending()` --> src/storage/archive.rs:1027:16 | 1027 | if let Poll::Pending = read { | -------^^^^^^^^^^^^^------- help: try: `if read.is_pending()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching = note: `#[warn(clippy::redundant_pattern_matching)]` on by default
if let .. else expression looks like `matches!` macro: src/storage/archive.rs#L671
warning: if let .. else expression looks like `matches!` macro --> src/storage/archive.rs:671:9 | 671 | / if let ConstructionFileState::Finalized(_) = &*guard { 672 | | true 673 | | } else { 674 | | false 675 | | } | |_________^ help: try: `matches!(&*guard, ConstructionFileState::Finalized(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
deref which would be done by auto-deref: src/storage/archive.rs#L516
warning: deref which would be done by auto-deref --> src/storage/archive.rs:516:41 | 516 | drop_from_cache(&mut *cache, id); | ^^^^^^^^^^^ help: try: `&mut cache` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: src/storage/archive.rs#L511
warning: deref which would be done by auto-deref --> src/storage/archive.rs:511:45 | 511 | ... drop_from_cache(&mut *cache, id); | ^^^^^^^^^^^ help: try: `&mut cache` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: src/storage/archive.rs#L500
warning: deref which would be done by auto-deref --> src/storage/archive.rs:500:29 | 500 | ... &mut *cache, | ^^^^^^^^^^^ help: try: `&mut cache` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` on by default
using `clone` on type `[u32; 5]` which implements the `Copy` trait: src/storage/archive.rs#L416
warning: using `clone` on type `[u32; 5]` which implements the `Copy` trait --> src/storage/archive.rs:416:22 | 416 | let id = peek.0.clone(); | ^^^^^^^^^^^^^^ help: try dereferencing it: `*peek.0` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` on by default
if let .. else expression looks like `matches!` macro: src/storage/archive.rs#L372
warning: if let .. else expression looks like `matches!` macro --> src/storage/archive.rs:372:9 | 372 | / if let Self::Resolving(_) = self { 373 | | true 374 | | } else { 375 | | false 376 | | } | |_________^ help: try: `matches!(self, Self::Resolving(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
this expression creates a reference which is immediately dereferenced by the compiler: src/storage/archive.rs#L321
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/storage/archive.rs:321:32 | 321 | Ok(Some(string_to_name(&name)?)) | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
called `skip(..).next()` on an iterator: src/storage/archive.rs#L318
warning: called `skip(..).next()` on an iterator --> src/storage/archive.rs:318:32 | 318 | let name = data.lines().skip(1).next().expect( | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next = note: `#[warn(clippy::iter_skip_next)]` on by default
casting to the same type is unnecessary (`usize` -> `usize`): src/storage/layer.rs#L2012
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/storage/layer.rs:2012:50 | 2012 | let mut predicate_existences = bitvec![0;stack_pred_count as usize+1]; | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stack_pred_count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`usize` -> `usize`): src/storage/layer.rs#L2011
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/storage/layer.rs:2011:51 | 2011 | let mut node_value_existences = bitvec![0;stack_node_value_count as usize+1]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stack_node_value_count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/storage/layer.rs#L1970
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/storage/layer.rs:1970:32 | 1970 | base_pred_count += self.get_predicate_count(current).await?.unwrap_or(0) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_predicate_count(current).await?.unwrap_or(0)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/storage/layer.rs#L1969
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/storage/layer.rs:1969:33 | 1969 | base_value_count += self.get_value_count(current).await?.unwrap_or(0) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_value_count(current).await?.unwrap_or(0)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/storage/layer.rs#L1968
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/storage/layer.rs:1968:32 | 1968 | base_node_count += self.get_node_count(current).await?.unwrap_or(0) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_node_count(current).await?.unwrap_or(0)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
useless conversion to the same type: `layer::internal::InternalLayer`: src/storage/layer.rs#L1567
warning: useless conversion to the same type: `layer::internal::InternalLayer` --> src/storage/layer.rs:1567:25 | 1567 | / ChildLayer::load_from_files(rollup_id, ancestor, &files) 1568 | | .await? 1569 | | .into(), | |___________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion help: consider removing `.into()` | 1567 ~ ChildLayer::load_from_files(rollup_id, ancestor, &files) 1568 ~ .await?, |
useless conversion to the same type: `layer::internal::InternalLayer`: src/storage/layer.rs#L1559
warning: useless conversion to the same type: `layer::internal::InternalLayer` --> src/storage/layer.rs:1559:38 | 1559 | layer = Arc::new(child_layer.into()); | ^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `child_layer` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `layer::internal::InternalLayer`: src/storage/layer.rs#L1531
warning: useless conversion to the same type: `layer::internal::InternalLayer` --> src/storage/layer.rs:1531:34 | 1531 | Arc::new(BaseLayer::load_from_files(rollup_id, &files).await?.into()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `BaseLayer::load_from_files(rollup_id, &files).await?` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `layer::internal::InternalLayer`: src/storage/layer.rs#L1526
warning: useless conversion to the same type: `layer::internal::InternalLayer` --> src/storage/layer.rs:1526:38 | 1526 | layer = Arc::new(base_layer.into()); | ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `base_layer` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
unneeded late initialization: src/storage/layer.rs#L1498
warning: unneeded late initialization --> src/storage/layer.rs:1498:25 | 1498 | let original_parent; | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init = note: `#[warn(clippy::needless_late_init)]` on by default help: declare `original_parent` here | 1499 | let original_parent = if self.layer_has_parent(current_layer).await? { | +++++++++++++++++++++ help: remove the assignments from the branches | 1500 ~ Some(self.read_parent_file(current_layer).await?) 1501 | } else { 1502 ~ None | help: add a semicolon after the `if` expression | 1503 | }; | +
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: src/storage/file.rs#L446
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> src/storage/file.rs:446:1 | 446 | impl Into<AdjacencyList> for AdjacencyListMaps { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into help: replace the `Into` implementation with `From<storage::file::AdjacencyListMaps>` | 446 ~ impl From<AdjacencyListMaps> for AdjacencyList { 447 ~ fn from(val: AdjacencyListMaps) -> Self { 448 | AdjacencyList::parse( 449 ~ val.nums_map, 450 ~ val.bitindex_maps.bits_map, 451 ~ val.bitindex_maps.blocks_map, 452 ~ val.bitindex_maps.sblocks_map, |
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: src/storage/file.rs#L405
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> src/storage/file.rs:405:1 | 405 | impl Into<BitIndex> for BitIndexMaps { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into = note: `#[warn(clippy::from_over_into)]` on by default help: replace the `Into` implementation with `From<storage::file::BitIndexMaps>` | 405 ~ impl From<BitIndexMaps> for BitIndex { 406 ~ fn from(val: BitIndexMaps) -> Self { 407 ~ BitIndex::from_maps(val.bits_map, val.blocks_map, val.sblocks_map) |
this call to `from_str_radix` can be replaced with a call to `str::parse`: src/storage/directory.rs#L229
warning: this call to `from_str_radix` can be replaced with a call to `str::parse` --> src/storage/directory.rs:229:19 | 229 | let version = u64::from_str_radix(version_str, 10); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `version_str.parse::<u64>()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 = note: `#[warn(clippy::from_str_radix_10)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/storage/directory.rs#L214
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/storage/directory.rs:214:37 | 214 | let s = String::from_utf8_lossy(&data); | ^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
module has the same name as its containing module: src/logging/mod.rs#L7
warning: module has the same name as its containing module --> src/logging/mod.rs:7:1 | 7 | pub mod logging; | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
`if` chain can be rewritten with `match`: src/layer/simple_builder.rs#L272
warning: `if` chain can be rewritten with `match` --> src/layer/simple_builder.rs:272:13 | 272 | / if addition < removal { 273 | | additions_it.next(); 274 | | } else if addition > removal { 275 | | let removal = removals_it.next().unwrap(); ... | 288 | | *removal = IdTriple::new(0, 0, 0); 289 | | } | |_____________^ | = help: consider rewriting the `if` chain to use `cmp` and `match` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain = note: `#[warn(clippy::comparison_chain)]` on by default
mutable key type: src/layer/layer.rs#L309
warning: mutable key type --> src/layer/layer.rs:309:20 | 309 | value_map: &HashMap<TypedDictEntry, u64>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type = note: `#[warn(clippy::mutable_key_type)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L273
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:273:65 | 273 | Self::Unresolved(u) => PossiblyResolved::Unresolved(&u), | ^^ help: change this to: `u` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L134
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:134:38 | 134 | .object_value_id(&value) | ^^^^^^ help: change this to: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L130
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:130:37 | 130 | .object_node_id(&node) | ^^^^^ help: change this to: `node` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L102
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:102:70 | 102 | ObjectType::Value(value) => self.object_value_id(&value), | ^^^^^^ help: change this to: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L101
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:101:67 | 101 | ObjectType::Node(node) => self.object_node_id(&node), | ^^^^^ help: change this to: `node` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
module has the same name as its containing module: src/layer/mod.rs#L9
warning: module has the same name as its containing module --> src/layer/mod.rs:9:1 | 9 | mod layer; | ^^^^^^^^^^ | = 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
casting to the same type is unnecessary (`u64` -> `u64`): src/layer/internal/mod.rs#L670
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/layer/internal/mod.rs:670:35 | 670 | if corrected_id > parent_count as u64 { | ^^^^^^^^^^^^^^^^^^^ help: try: `parent_count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/layer/internal/mod.rs#L639
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/layer/internal/mod.rs:639:35 | 639 | if corrected_id > parent_count as u64 { | ^^^^^^^^^^^^^^^^^^^ help: try: `parent_count` | = 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
match expression looks like `matches!` macro: src/layer/internal/mod.rs#L528
warning: match expression looks like `matches!` macro --> src/layer/internal/mod.rs:528:9 | 528 | / match self { 529 | | Rollup(_) => true, 530 | | _ => false, 531 | | } | |_________^ help: try: `matches!(self, Rollup(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro = note: `#[warn(clippy::match_like_matches_macro)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/internal/subject_iterator.rs#L425
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/internal/subject_iterator.rs:425:42 | 425 | match lowest_pos.cmp(&lowest_neg) { | ^^^^^^^^^^^ help: change this to: `lowest_neg` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this if-then-else expression assigns a bool literal: src/layer/internal/predicate_iterator.rs#L86
warning: this if-then-else expression assigns a bool literal --> src/layer/internal/predicate_iterator.rs:86:9 | 86 | / if next.is_none() 87 | | || next.map(|t| (t.subject, t.predicate)) != result.map(|t| (t.subject, t.predicate)) 88 | | { 89 | | self.sp_boundary = true; 90 | | } else { 91 | | self.sp_boundary = false; 92 | | } | |_________^ help: you can reduce it to: `self.sp_boundary = next.is_none() || next.map(|t| (t.subject, t.predicate)) != result.map(|t| (t.subject, t.predicate));` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign = note: `#[warn(clippy::needless_bool_assign)]` on by default
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`: src/layer/internal/base_merge.rs#L223
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` --> src/layer/internal/base_merge.rs:223:31 | 223 | for (ix, input) in inputs.into_iter().enumerate() { | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref = note: `#[warn(clippy::into_iter_on_ref)]` on by default
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L278
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:278:9 | 276 | let ids = self.builder.add_values(values); | ------------------------------------------ unnecessary `let` binding 277 | 278 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 276 ~ 277 | 278 ~ self.builder.add_values(values) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L262
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:262:9 | 260 | let ids = self.builder.add_predicates_bytes(predicates); | -------------------------------------------------------- unnecessary `let` binding 261 | 262 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 260 ~ 261 | 262 ~ self.builder.add_predicates_bytes(predicates) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L249
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:249:9 | 247 | let ids = self.builder.add_predicates(predicates); | -------------------------------------------------- unnecessary `let` binding 248 | 249 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 247 ~ 248 | 249 ~ self.builder.add_predicates(predicates) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L233
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:233:9 | 231 | let ids = self.builder.add_nodes_bytes(nodes); | ---------------------------------------------- unnecessary `let` binding 232 | 233 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 231 ~ 232 | 233 ~ self.builder.add_nodes_bytes(nodes) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L220
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:220:9 | 218 | let ids = self.builder.add_nodes(nodes); | ---------------------------------------- unnecessary `let` binding 219 | 220 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 218 ~ 219 | 220 ~ self.builder.add_nodes(nodes) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L204
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:204:9 | 202 | let id = self.builder.add_value(value); | --------------------------------------- unnecessary `let` binding 203 | 204 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 202 ~ 203 | 204 ~ self.builder.add_value(value) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L191
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:191:9 | 189 | let id = self.builder.add_predicate(predicate); | ----------------------------------------------- unnecessary `let` binding 190 | 191 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 189 ~ 190 | 191 ~ self.builder.add_predicate(predicate) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L178
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:178:9 | 176 | let id = self.builder.add_node(node); | ------------------------------------- unnecessary `let` binding 177 | 178 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 176 ~ 177 | 178 ~ self.builder.add_node(node) |
this loop could be written as a `for` loop: src/layer/builder.rs#L473
warning: this loop could be written as a `for` loop --> src/layer/builder.rs:473:9 | 473 | while let Some((object, sp)) = merged_iters.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for (object, sp) in merged_iters.by_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator = note: `#[warn(clippy::while_let_on_iterator)]` on by default
returning the result of a `let` binding from a block: src/layer/builder.rs#L87
warning: returning the result of a `let` binding from a block --> src/layer/builder.rs:87:9 | 85 | let id = self.value_dictionary_builder.add(value); | -------------------------------------------------- unnecessary `let` binding 86 | 87 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 85 ~ 86 | 87 ~ self.value_dictionary_builder.add(value) |
returning the result of a `let` binding from a block: src/layer/builder.rs#L78
warning: returning the result of a `let` binding from a block --> src/layer/builder.rs:78:9 | 76 | let id = self.predicate_dictionary_builder.add(predicate); | ---------------------------------------------------------- unnecessary `let` binding 77 | 78 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 76 ~ 77 | 78 ~ self.predicate_dictionary_builder.add(predicate) |
returning the result of a `let` binding from a block: src/layer/builder.rs#L61
warning: returning the result of a `let` binding from a block --> src/layer/builder.rs:61:9 | 59 | let id = self.node_dictionary_builder.add(node); | ------------------------------------------------ unnecessary `let` binding 60 | 61 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 59 ~ 60 | 61 ~ self.node_dictionary_builder.add(node) |
this `else { if .. }` block can be collapsed: src/storage/locking.rs#L55
warning: this `else { if .. }` block can be collapsed --> src/storage/locking.rs:55:28 | 55 | } else { | ____________________________^ 56 | | if !cfg!(feature = "noreadlock") { 57 | | file.lock_shared() 58 | | .expect("failed to acquire exclusive lock") 59 | | } 60 | | } | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 55 ~ } else if !cfg!(feature = "noreadlock") { 56 + file.lock_shared() 57 + .expect("failed to acquire exclusive lock") 58 + } |
constants have by default a `'static` lifetime: src/storage/consts.rs#L584
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:584:41 | 584 | pub const CHILD_LAYER_OPTIONAL_FILES: [&'static str; 4] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L550
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:550:41 | 550 | pub const CHILD_LAYER_REQUIRED_FILES: [&'static str; 31] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L547
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:547:40 | 547 | pub const BASE_LAYER_OPTIONAL_FILES: [&'static str; 2] = | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L529
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:529:40 | 529 | pub const BASE_LAYER_REQUIRED_FILES: [&'static str; 15] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L519
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:519:36 | 519 | pub const SHARED_OPTIONAL_FILES: [&'static str; 7] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L508
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:508:36 | 508 | pub const SHARED_REQUIRED_FILES: [&'static str; 8] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
redundant field names in struct initialization: src/layer/internal/subject_iterator.rs#L27
warning: redundant field names in struct initialization --> src/layer/internal/subject_iterator.rs:27:13 | 27 | sp_o_adjacency_list: sp_o_adjacency_list, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sp_o_adjacency_list` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/subject_iterator.rs#L26
warning: redundant field names in struct initialization --> src/layer/internal/subject_iterator.rs:26:13 | 26 | s_p_adjacency_list: s_p_adjacency_list, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `s_p_adjacency_list` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/subject_iterator.rs#L25
warning: redundant field names in struct initialization --> src/layer/internal/subject_iterator.rs:25:13 | 25 | subjects: subjects, | ^^^^^^^^^^^^^^^^^^ help: replace it with: `subjects` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/object_iterator.rs#L28
warning: redundant field names in struct initialization --> src/layer/internal/object_iterator.rs:28:13 | 28 | s_p_adjacency_list: s_p_adjacency_list, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `s_p_adjacency_list` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/object_iterator.rs#L27
warning: redundant field names in struct initialization --> src/layer/internal/object_iterator.rs:27:13 | 27 | o_ps_adjacency_list: o_ps_adjacency_list, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `o_ps_adjacency_list` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/object_iterator.rs#L26
warning: redundant field names in struct initialization --> src/layer/internal/object_iterator.rs:26:13 | 26 | objects: objects, | ^^^^^^^^^^^^^^^^ help: replace it with: `objects` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/object_iterator.rs#L25
warning: redundant field names in struct initialization --> src/layer/internal/object_iterator.rs:25:13 | 25 | subjects: subjects, | ^^^^^^^^^^^^^^^^^^ help: replace it with: `subjects` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names = note: `#[warn(clippy::redundant_field_names)]` on by default
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do: src/structure/wavelettree.rs#L266
warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do --> src/structure/wavelettree.rs:266:54 | 266 | fn push_to_fragments(num: u64, width: u8, fragments: &mut Vec<FragmentBuilder>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&mut [FragmentBuilder]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/wavelettree.rs#L171
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/wavelettree.rs:171:32 | 171 | let mut alphabet_end = 2_u64.pow(self.num_layers as u32) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `2_u64.pow(self.num_layers as u32)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/wavelettree.rs#L125
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/wavelettree.rs:125:32 | 125 | let mut alphabet_end = 2_u64.pow(self.num_layers as u32) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `2_u64.pow(self.num_layers as u32)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
struct `WaveletTree` has a public `len` method, but no `is_empty` method: src/structure/wavelettree.rs#L101
warning: struct `WaveletTree` has a public `len` method, but no `is_empty` method --> src/structure/wavelettree.rs:101:5 | 101 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
struct `WaveletLookup` has a public `len` method, but no `is_empty` method: src/structure/wavelettree.rs#L43
warning: struct `WaveletLookup` has a public `len` method, but no `is_empty` method --> src/structure/wavelettree.rs:43:5 | 43 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
this expression creates a reference which is immediately dereferenced by the compiler: src/structure/util.rs#L43
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/structure/util.rs:43:17 | 43 | w.write_all(&bytes).await?; | ^^^^^^ help: change this to: `bytes` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/tfc/typed.rs#L482
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/tfc/typed.rs:482:23 | 482 | .push(block_offset_builder.count() as u64 - 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `block_offset_builder.count()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`: src/structure/tfc/typed.rs#L472
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` --> src/structure/tfc/typed.rs:472:13 | 472 | / self.sized_dict_buf_builder 473 | | .as_mut() 474 | | .map(|b| b.record_size = value.datatype.record_size()); | |______________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn = note: `#[warn(clippy::option_map_unit_fn)]` on by default help: try | 472 ~ if let Some(b) = self.sized_dict_buf_builder 473 + .as_mut() { ... } |
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/typed.rs#L398
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/typed.rs:398:5 | 398 | / pub fn into_iter(self) -> impl Iterator<Item = SizedDictEntry> + Clone { 399 | | self.0.into_iter() 400 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L394
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:394:17 | 394 | pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 394 - pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { 394 + pub fn iter(&self) -> impl Iterator<Item = SizedDictEntry> + '_ + Clone { |
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/typed.rs#L365
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/typed.rs:365:5 | 365 | / pub fn into_iter(self) -> impl Iterator<Item = SizedDictEntry> + Clone { 366 | | self.dict.into_iter() 367 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L361
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:361:17 | 361 | pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 361 - pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { 361 + pub fn iter(&self) -> impl Iterator<Item = SizedDictEntry> + '_ + Clone { |
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/typed.rs#L299
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/typed.rs:299:5 | 299 | / pub fn into_iter(self) -> impl Iterator<Item = TypedDictEntry> + Clone { 300 | | self.into_block_iter().flat_map(|(datatype, segment)| { 301 | | segment 302 | | .into_iter() 303 | | .map(move |entry| TypedDictEntry::new(datatype, entry)) 304 | | }) 305 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L291
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:291:17 | 291 | pub fn iter<'a>(&'a self) -> impl Iterator<Item = TypedDictEntry> + 'a + Clone { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 291 - pub fn iter<'a>(&'a self) -> impl Iterator<Item = TypedDictEntry> + 'a + Clone { 291 + pub fn iter(&self) -> impl Iterator<Item = TypedDictEntry> + '_ + Clone { |
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L273
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:273:23 | 273 | pub fn block_iter<'a>( | ^^ 274 | &'a self, | ^^ 275 | ) -> impl Iterator<Item = (Datatype, SizedDictBlock)> + 'a + Clone { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 273 ~ pub fn block_iter( 274 ~ &self, 275 ~ ) -> impl Iterator<Item = (Datatype, SizedDictBlock)> + '_ + Clone { |
this expression creates a reference which is immediately dereferenced by the compiler: src/structure/tfc/typed.rs#L261
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/structure/tfc/typed.rs:261:33 | 261 | dict: Cow::Borrowed(&self), | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: src/structure/tfc/typed.rs#L259
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/typed.rs:259:25 | 259 | pub fn segment_iter<'a>(&'a self) -> DictSegmentIterator<'a> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 259 - pub fn segment_iter<'a>(&'a self) -> DictSegmentIterator<'a> { 259 + pub fn segment_iter(&self) -> DictSegmentIterator<'_> { |
manual implementation of `Option::map`: src/structure/tfc/typed.rs#L207
warning: manual implementation of `Option::map` --> src/structure/tfc/typed.rs:207:9 | 207 | / if let Some(i) = self.types_present.index_of(dt as u64) { 208 | | Some(self.inner_type_segment(i)) 209 | | } else { 210 | | None 211 | | } | |_________^ help: try: `self.types_present.index_of(dt as u64).map(|i| self.inner_type_segment(i))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map = note: `#[warn(clippy::manual_map)]` on by default
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/tfc/typed.rs#L202
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/tfc/typed.rs:202:13 | 202 | id_offset as u64, | ^^^^^^^^^^^^^^^^ help: try: `id_offset` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`usize` -> `usize`): src/structure/tfc/typed.rs#L170
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/structure/tfc/typed.rs:170:53 | 170 | block_offset = self.block_offsets.entry(type_offset as usize) as usize; | ^^^^^^^^^^^^^^^^^^^^ help: try: `type_offset` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
very complex type used. Consider factoring parts into `type` definitions: src/structure/tfc/stream.rs#L23
warning: very complex type used. Consider factoring parts into `type` definitions --> src/structure/tfc/stream.rs:23:9 | 23 | / Pin< 24 | | Box< 25 | | dyn Future< 26 | | Output = Result< ... | 32 | | >, 33 | | >, | |_________^ | = 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
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/dict.rs#L241
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/dict.rs:241:5 | 241 | / pub fn into_iter(self) -> impl Iterator<Item = SizedDictEntry> + Clone { 242 | | self.into_block_iter().flat_map(|b| b.into_iter()) 243 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
the following explicit lifetimes could be elided: 'a: src/structure/tfc/dict.rs#L237
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/dict.rs:237:17 | 237 | pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 237 - pub fn iter<'a>(&'a self) -> impl Iterator<Item = SizedDictEntry> + 'a + Clone { 237 + pub fn iter(&self) -> impl Iterator<Item = SizedDictEntry> + '_ + Clone { |
the following explicit lifetimes could be elided: 'a: src/structure/tfc/dict.rs#L223
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/dict.rs:223:23 | 223 | pub fn block_iter<'a>(&'a self) -> SizedDictBlockIterator<'a> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 223 - pub fn block_iter<'a>(&'a self) -> SizedDictBlockIterator<'a> { 223 + pub fn block_iter(&self) -> SizedDictBlockIterator<'_> { |
returning the result of a `let` binding from a block: src/structure/tfc/dict.rs#L220
warning: returning the result of a `let` binding from a block --> src/structure/tfc/dict.rs:220:9 | 207 | let result = block_id.offset(offset).default(offset - 1); | --------------------------------------------------------- unnecessary `let` binding ... 220 | result | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 207 ~ 208 | /* ... 219 | 220 ~ block_id.offset(offset).default(offset - 1) |
casting to the same type is unnecessary (`usize` -> `usize`): src/structure/tfc/dict.rs#L172
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/structure/tfc/dict.rs:172:26 | 172 | Some(block.entry(((index - 1) % 8) as usize)) | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((index - 1) % 8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`usize` -> `usize`): src/structure/tfc/dict.rs#L171
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/structure/tfc/dict.rs:171:32 | 171 | let block = self.block(((index - 1) / 8) as usize); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((index - 1) / 8)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
unneeded late initialization: src/structure/tfc/dict.rs#L134
warning: unneeded late initialization --> src/structure/tfc/dict.rs:134:9 | 134 | let block_bytes; | ^^^^^^^^^^^^^^^^ created here 135 | block_bytes = self.data.slice(offset..); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ initialised here | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init help: declare `block_bytes` here | 135 | let block_bytes = self.data.slice(offset..); | ~~~~~~~~~~~~~~~
unneeded late initialization: src/structure/tfc/dict.rs#L119
warning: unneeded late initialization --> src/structure/tfc/dict.rs:119:9 | 119 | let offset: usize; | ^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init help: declare `offset` here | 120 | let offset: usize = if block_index == 0 { | +++++++++++++++++++ help: remove the assignments from the branches | 121 ~ 0 122 | } else { 123 ~ (self.offsets.entry(block_index - 1) - self.dict_offset) as usize | help: add a semicolon after the `if` expression | 124 | }; | +
length comparison to zero: src/structure/tfc/dict.rs#L69
warning: length comparison to zero --> src/structure/tfc/dict.rs:69:12 | 69 | if self.current_block.len() > 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!self.current_block.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
binary comparison to literal `Option::None`: src/structure/tfc/block.rs#L803
warning: binary comparison to literal `Option::None` --> src/structure/tfc/block.rs:803:12 | 803 | if record_size == None { | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `record_size.is_none()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none
the loop variable `i` is only used to index `slices`: src/structure/tfc/block.rs#L796
warning: the loop variable `i` is only used to index `slices` --> src/structure/tfc/block.rs:796:14 | 796 | for i in 1..slices.len() { | ^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop = note: `#[warn(clippy::needless_range_loop)]` on by default help: consider using an iterator | 796 | for <item> in slices.iter().skip(1) { | ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
casting to the same type is unnecessary (`u8` -> `u8`): src/structure/tfc/block.rs#L782
warning: casting to the same type is unnecessary (`u8` -> `u8`) --> src/structure/tfc/block.rs:782:16 | 782 | buf.put_u8(cw as u8); | ^^^^^^^^ help: try: `cw` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter`: src/structure/tfc/block.rs#L644
warning: method `into_iter` can be confused for the standard trait method `std::iter::IntoIterator::into_iter` --> src/structure/tfc/block.rs:644:5 | 644 | / pub fn into_iter(self) -> OwnedSizedBlockIterator { 645 | | SizedBlockIterator { 646 | | header: Cow::Owned(self.header), 647 | | data: self.data.clone(), ... | 650 | | } 651 | | } | |_____^ | = help: consider implementing the trait `std::iter::IntoIterator` or choosing a less ambiguous method name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait = note: `#[warn(clippy::should_implement_trait)]` on by default
the following explicit lifetimes could be elided: 'a: src/structure/tfc/block.rs#L635
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/block.rs:635:17 | 635 | pub fn iter<'a>(&'a self) -> SizedBlockIterator<'a> { | ^^ ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 635 - pub fn iter<'a>(&'a self) -> SizedBlockIterator<'a> { 635 + pub fn iter(&self) -> SizedBlockIterator<'_> { |
`if` chain can be rewritten with `match`: src/structure/tfc/block.rs#L615
warning: `if` chain can be rewritten with `match` --> src/structure/tfc/block.rs:615:13 | 615 | / if *shared < common_prefix { 616 | | return IdLookupResult::Closest(ix as u64); 617 | | } else if *shared > common_prefix { 618 | | continue; 619 | | } | |_____________^ | = help: consider rewriting the `if` chain to use `cmp` and `match` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
the following explicit lifetimes could be elided: 'a: src/structure/tfc/block.rs#L586
warning: the following explicit lifetimes could be elided: 'a --> src/structure/tfc/block.rs:586:17 | 586 | fn suffixes<'a>(&'a self) -> impl Iterator<Item = Bytes> + 'a { | ^^ ^^ ^^ | = 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 | 586 - fn suffixes<'a>(&'a self) -> impl Iterator<Item = Bytes> + 'a { 586 + fn suffixes(&self) -> impl Iterator<Item = Bytes> + '_ { |
unneeded late initialization: src/structure/tfc/block.rs#L569
warning: unneeded late initialization --> src/structure/tfc/block.rs:569:13 | 569 | let slice; | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init help: declare `slice` here | 570 | let slice = if ix == 0 && start == 0 { | +++++++++++ help: remove the assignments from the branches | 572 ~ self.header.head.slice(..have_to_take) 573 | } else { 574 ~ self.data.slice(cur_offset..cur_offset + have_to_take) | help: add a semicolon after the `if` expression | 575 | }; | +
this expression creates a reference which is immediately dereferenced by the compiler: src/structure/tfc/block.rs#L406
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/structure/tfc/block.rs:406:42 | 406 | SizedDictEntry::Single(b) => &b, | ^^ help: change this to: `b` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
enum `SizedDictEntry` has a public `len` method, but no `is_empty` method: src/structure/tfc/block.rs#L230
warning: enum `SizedDictEntry` has a public `len` method, but no `is_empty` method --> src/structure/tfc/block.rs:230:5 | 230 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
binary comparison to literal `Option::None`: src/structure/tfc/block.rs#L120
warning: binary comparison to literal `Option::None` --> src/structure/tfc/block.rs:120:27 | 120 | let size = if record_size == None { | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `record_size.is_none()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none
binary comparison to literal `Option::None`: src/structure/tfc/block.rs#L84
warning: binary comparison to literal `Option::None` --> src/structure/tfc/block.rs:84:27 | 84 | let size = if record_size == None { | ^^^^^^^^^^^^^^^^^^^ help: use `Option::is_none()` instead: `record_size.is_none()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none = note: `#[warn(clippy::partialeq_to_none)]` on by default
useless conversion to the same type: `u64`: src/structure/logarray.rs#L490
warning: useless conversion to the same type: `u64` --> src/structure/logarray.rs:490:12 | 490 | if u64::from(self.count) * u64::from(self.width) & 0b11_1111 != 0 { | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `u64::from()`: `self.count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `u32`: src/structure/logarray.rs#L449
warning: useless conversion to the same type: `u32` --> src/structure/logarray.rs:449:34 | 449 | if val.leading_zeros() < u32::from(leading_zeros) { | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `u32::from()`: `leading_zeros` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
returning the result of a `let` binding from a block: src/structure/logarray.rs#L259
warning: returning the result of a `let` binding from a block --> src/structure/logarray.rs:259:5 | 257 | let num_bytes = num_u64 * 8; | ---------------------------- unnecessary `let` binding 258 | 259 | num_bytes | ^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 257 ~ 258 | 259 ~ num_u64 * 8 |
this loop could be written as a `for` loop: src/structure/bitindex.rs#L454
warning: this loop could be written as a `for` loop --> src/structure/bitindex.rs:454:5 | 454 | while let Some(chunk) = iter.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for chunk in iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
casting to the same type is unnecessary (`u64` -> `u64`): src/structure/bitindex.rs#L246
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/structure/bitindex.rs:246:33 | 246 | return Some(i as u64); | ^^^^^^^^ help: try: `i` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
struct `BitIndex` has a public `len` method, but no `is_empty` method: src/structure/bitindex.rs#L65
warning: struct `BitIndex` has a public `len` method, but no `is_empty` method --> src/structure/bitindex.rs:65:5 | 65 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty = note: `#[warn(clippy::len_without_is_empty)]` on by default
this loop could be written as a `for` loop: src/structure/bitarray.rs#L241
warning: this loop could be written as a `for` loop --> src/structure/bitarray.rs:241:9 | 241 | while let Some(bit) = iter.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for bit in iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
this loop could be written as a `for` loop: src/structure/adjacencylist.rs#L291
warning: this loop could be written as a `for` loop --> src/structure/adjacencylist.rs:291:9 | 291 | while let Some((left, right)) = iter.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for (left, right) in iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
unneeded `return` statement: src/store/mod.rs#L138
warning: unneeded `return` statement --> src/store/mod.rs:138:17 | 138 | / return Err(io::Error::new( 139 | | io::ErrorKind::InvalidData, 140 | | "builder has already been committed", 141 | | )) | |__________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 138 ~ Err(io::Error::new( 139 + io::ErrorKind::InvalidData, 140 + "builder has already been committed", 141 + )) |
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: src/storage/pack.rs#L171
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> src/storage/pack.rs:171:17 | 171 | layer_path: &PathBuf, | ^^^^^^^^ help: change this to: `&Path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: src/storage/pack.rs#L141
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> src/storage/pack.rs:141:17 | 141 | layer_path: &PathBuf, | ^^^^^^^^ help: change this to: `&Path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
you should consider adding a `Default` implementation for `MemoryBackedStore`: src/storage/memory.rs#L29
warning: you should consider adding a `Default` implementation for `MemoryBackedStore` --> src/storage/memory.rs:29:5 | 29 | / pub fn new() -> Self { 30 | | Self { 31 | | contents: Arc::new(RwLock::new(MemoryBackedStoreContents::Nonexistent)), 32 | | } 33 | | } | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default = note: `#[warn(clippy::new_without_default)]` on by default help: try adding this | 28 + impl Default for MemoryBackedStore { 29 + fn default() -> Self { 30 + Self::new() 31 + } 32 + } |
deref on an immutable reference: src/storage/delta.rs#L22
warning: deref on an immutable reference --> src/storage/delta.rs:22:17 | 22 | let mut l = &*layer; | ^^^^^^^ help: if you would like to reborrow, try removing `&*`: `layer` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref = note: `#[warn(clippy::borrow_deref_ref)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/storage/archive.rs#L1189
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/storage/archive.rs:1189:40 | 1189 | let rollup_id = string_to_name(&line)?; | ^^^^^ help: change this to: `line` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
called `skip(..).next()` on an iterator: src/storage/archive.rs#L1188
warning: called `skip(..).next()` on an iterator --> src/storage/archive.rs:1188:41 | 1188 | let line = rollup_string.lines().skip(1).next().unwrap(); | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next
redundant pattern matching, consider using `is_pending()`: src/storage/archive.rs#L1027
warning: redundant pattern matching, consider using `is_pending()` --> src/storage/archive.rs:1027:16 | 1027 | if let Poll::Pending = read { | -------^^^^^^^^^^^^^------- help: try: `if read.is_pending()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching = note: `#[warn(clippy::redundant_pattern_matching)]` on by default
if let .. else expression looks like `matches!` macro: src/storage/archive.rs#L671
warning: if let .. else expression looks like `matches!` macro --> src/storage/archive.rs:671:9 | 671 | / if let ConstructionFileState::Finalized(_) = &*guard { 672 | | true 673 | | } else { 674 | | false 675 | | } | |_________^ help: try: `matches!(&*guard, ConstructionFileState::Finalized(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
deref which would be done by auto-deref: src/storage/archive.rs#L516
warning: deref which would be done by auto-deref --> src/storage/archive.rs:516:41 | 516 | drop_from_cache(&mut *cache, id); | ^^^^^^^^^^^ help: try: `&mut cache` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: src/storage/archive.rs#L511
warning: deref which would be done by auto-deref --> src/storage/archive.rs:511:45 | 511 | ... drop_from_cache(&mut *cache, id); | ^^^^^^^^^^^ help: try: `&mut cache` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
deref which would be done by auto-deref: src/storage/archive.rs#L500
warning: deref which would be done by auto-deref --> src/storage/archive.rs:500:29 | 500 | ... &mut *cache, | ^^^^^^^^^^^ help: try: `&mut cache` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `#[warn(clippy::explicit_auto_deref)]` on by default
using `clone` on type `[u32; 5]` which implements the `Copy` trait: src/storage/archive.rs#L416
warning: using `clone` on type `[u32; 5]` which implements the `Copy` trait --> src/storage/archive.rs:416:22 | 416 | let id = peek.0.clone(); | ^^^^^^^^^^^^^^ help: try dereferencing it: `*peek.0` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` on by default
if let .. else expression looks like `matches!` macro: src/storage/archive.rs#L372
warning: if let .. else expression looks like `matches!` macro --> src/storage/archive.rs:372:9 | 372 | / if let Self::Resolving(_) = self { 373 | | true 374 | | } else { 375 | | false 376 | | } | |_________^ help: try: `matches!(self, Self::Resolving(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
this expression creates a reference which is immediately dereferenced by the compiler: src/storage/archive.rs#L321
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/storage/archive.rs:321:32 | 321 | Ok(Some(string_to_name(&name)?)) | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
called `skip(..).next()` on an iterator: src/storage/archive.rs#L318
warning: called `skip(..).next()` on an iterator --> src/storage/archive.rs:318:32 | 318 | let name = data.lines().skip(1).next().expect( | ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next = note: `#[warn(clippy::iter_skip_next)]` on by default
casting to the same type is unnecessary (`usize` -> `usize`): src/storage/layer.rs#L2012
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/storage/layer.rs:2012:50 | 2012 | let mut predicate_existences = bitvec![0;stack_pred_count as usize+1]; | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stack_pred_count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`usize` -> `usize`): src/storage/layer.rs#L2011
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> src/storage/layer.rs:2011:51 | 2011 | let mut node_value_existences = bitvec![0;stack_node_value_count as usize+1]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `stack_node_value_count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/storage/layer.rs#L1970
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/storage/layer.rs:1970:32 | 1970 | base_pred_count += self.get_predicate_count(current).await?.unwrap_or(0) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_predicate_count(current).await?.unwrap_or(0)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/storage/layer.rs#L1969
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/storage/layer.rs:1969:33 | 1969 | base_value_count += self.get_value_count(current).await?.unwrap_or(0) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_value_count(current).await?.unwrap_or(0)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/storage/layer.rs#L1968
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/storage/layer.rs:1968:32 | 1968 | base_node_count += self.get_node_count(current).await?.unwrap_or(0) as u64; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.get_node_count(current).await?.unwrap_or(0)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
useless conversion to the same type: `layer::internal::InternalLayer`: src/storage/layer.rs#L1567
warning: useless conversion to the same type: `layer::internal::InternalLayer` --> src/storage/layer.rs:1567:25 | 1567 | / ChildLayer::load_from_files(rollup_id, ancestor, &files) 1568 | | .await? 1569 | | .into(), | |___________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion help: consider removing `.into()` | 1567 ~ ChildLayer::load_from_files(rollup_id, ancestor, &files) 1568 ~ .await?, |
useless conversion to the same type: `layer::internal::InternalLayer`: src/storage/layer.rs#L1559
warning: useless conversion to the same type: `layer::internal::InternalLayer` --> src/storage/layer.rs:1559:38 | 1559 | layer = Arc::new(child_layer.into()); | ^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `child_layer` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `layer::internal::InternalLayer`: src/storage/layer.rs#L1531
warning: useless conversion to the same type: `layer::internal::InternalLayer` --> src/storage/layer.rs:1531:34 | 1531 | Arc::new(BaseLayer::load_from_files(rollup_id, &files).await?.into()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `BaseLayer::load_from_files(rollup_id, &files).await?` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
useless conversion to the same type: `layer::internal::InternalLayer`: src/storage/layer.rs#L1526
warning: useless conversion to the same type: `layer::internal::InternalLayer` --> src/storage/layer.rs:1526:38 | 1526 | layer = Arc::new(base_layer.into()); | ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `base_layer` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[warn(clippy::useless_conversion)]` on by default
unneeded late initialization: src/storage/layer.rs#L1498
warning: unneeded late initialization --> src/storage/layer.rs:1498:25 | 1498 | let original_parent; | ^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init = note: `#[warn(clippy::needless_late_init)]` on by default help: declare `original_parent` here | 1499 | let original_parent = if self.layer_has_parent(current_layer).await? { | +++++++++++++++++++++ help: remove the assignments from the branches | 1500 ~ Some(self.read_parent_file(current_layer).await?) 1501 | } else { 1502 ~ None | help: add a semicolon after the `if` expression | 1503 | }; | +
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: src/storage/file.rs#L446
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> src/storage/file.rs:446:1 | 446 | impl Into<AdjacencyList> for AdjacencyListMaps { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into help: replace the `Into` implementation with `From<storage::file::AdjacencyListMaps>` | 446 ~ impl From<AdjacencyListMaps> for AdjacencyList { 447 ~ fn from(val: AdjacencyListMaps) -> Self { 448 | AdjacencyList::parse( 449 ~ val.nums_map, 450 ~ val.bitindex_maps.bits_map, 451 ~ val.bitindex_maps.blocks_map, 452 ~ val.bitindex_maps.sblocks_map, |
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: src/storage/file.rs#L405
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> src/storage/file.rs:405:1 | 405 | impl Into<BitIndex> for BitIndexMaps { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into = note: `#[warn(clippy::from_over_into)]` on by default help: replace the `Into` implementation with `From<storage::file::BitIndexMaps>` | 405 ~ impl From<BitIndexMaps> for BitIndex { 406 ~ fn from(val: BitIndexMaps) -> Self { 407 ~ BitIndex::from_maps(val.bits_map, val.blocks_map, val.sblocks_map) |
this call to `from_str_radix` can be replaced with a call to `str::parse`: src/storage/directory.rs#L229
warning: this call to `from_str_radix` can be replaced with a call to `str::parse` --> src/storage/directory.rs:229:19 | 229 | let version = u64::from_str_radix(version_str, 10); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `version_str.parse::<u64>()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_str_radix_10 = note: `#[warn(clippy::from_str_radix_10)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/storage/directory.rs#L214
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/storage/directory.rs:214:37 | 214 | let s = String::from_utf8_lossy(&data); | ^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
module has the same name as its containing module: src/logging/mod.rs#L7
warning: module has the same name as its containing module --> src/logging/mod.rs:7:1 | 7 | pub mod logging; | ^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
`if` chain can be rewritten with `match`: src/layer/simple_builder.rs#L272
warning: `if` chain can be rewritten with `match` --> src/layer/simple_builder.rs:272:13 | 272 | / if addition < removal { 273 | | additions_it.next(); 274 | | } else if addition > removal { 275 | | let removal = removals_it.next().unwrap(); ... | 288 | | *removal = IdTriple::new(0, 0, 0); 289 | | } | |_____________^ | = help: consider rewriting the `if` chain to use `cmp` and `match` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain = note: `#[warn(clippy::comparison_chain)]` on by default
mutable key type: src/layer/layer.rs#L309
warning: mutable key type --> src/layer/layer.rs:309:20 | 309 | value_map: &HashMap<TypedDictEntry, u64>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mutable_key_type = note: `#[warn(clippy::mutable_key_type)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L273
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:273:65 | 273 | Self::Unresolved(u) => PossiblyResolved::Unresolved(&u), | ^^ help: change this to: `u` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L134
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:134:38 | 134 | .object_value_id(&value) | ^^^^^^ help: change this to: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L130
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:130:37 | 130 | .object_node_id(&node) | ^^^^^ help: change this to: `node` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L102
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:102:70 | 102 | ObjectType::Value(value) => self.object_value_id(&value), | ^^^^^^ help: change this to: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/layer.rs#L101
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/layer.rs:101:67 | 101 | ObjectType::Node(node) => self.object_node_id(&node), | ^^^^^ help: change this to: `node` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
module has the same name as its containing module: src/layer/mod.rs#L9
warning: module has the same name as its containing module --> src/layer/mod.rs:9:1 | 9 | mod layer; | ^^^^^^^^^^ | = 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
casting to the same type is unnecessary (`u64` -> `u64`): src/layer/internal/mod.rs#L670
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/layer/internal/mod.rs:670:35 | 670 | if corrected_id > parent_count as u64 { | ^^^^^^^^^^^^^^^^^^^ help: try: `parent_count` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): src/layer/internal/mod.rs#L639
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/layer/internal/mod.rs:639:35 | 639 | if corrected_id > parent_count as u64 { | ^^^^^^^^^^^^^^^^^^^ help: try: `parent_count` | = 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
match expression looks like `matches!` macro: src/layer/internal/mod.rs#L528
warning: match expression looks like `matches!` macro --> src/layer/internal/mod.rs:528:9 | 528 | / match self { 529 | | Rollup(_) => true, 530 | | _ => false, 531 | | } | |_________^ help: try: `matches!(self, Rollup(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro = note: `#[warn(clippy::match_like_matches_macro)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: src/layer/internal/subject_iterator.rs#L425
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/internal/subject_iterator.rs:425:42 | 425 | match lowest_pos.cmp(&lowest_neg) { | ^^^^^^^^^^^ help: change this to: `lowest_neg` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` on by default
this if-then-else expression assigns a bool literal: src/layer/internal/predicate_iterator.rs#L86
warning: this if-then-else expression assigns a bool literal --> src/layer/internal/predicate_iterator.rs:86:9 | 86 | / if next.is_none() 87 | | || next.map(|t| (t.subject, t.predicate)) != result.map(|t| (t.subject, t.predicate)) 88 | | { 89 | | self.sp_boundary = true; 90 | | } else { 91 | | self.sp_boundary = false; 92 | | } | |_________^ help: you can reduce it to: `self.sp_boundary = next.is_none() || next.map(|t| (t.subject, t.predicate)) != result.map(|t| (t.subject, t.predicate));` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool_assign = note: `#[warn(clippy::needless_bool_assign)]` on by default
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`: src/layer/internal/base_merge.rs#L223
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` --> src/layer/internal/base_merge.rs:223:31 | 223 | for (ix, input) in inputs.into_iter().enumerate() { | ^^^^^^^^^ help: call directly: `iter` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref = note: `#[warn(clippy::into_iter_on_ref)]` on by default
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L278
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:278:9 | 276 | let ids = self.builder.add_values(values); | ------------------------------------------ unnecessary `let` binding 277 | 278 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 276 ~ 277 | 278 ~ self.builder.add_values(values) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L262
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:262:9 | 260 | let ids = self.builder.add_predicates_bytes(predicates); | -------------------------------------------------------- unnecessary `let` binding 261 | 262 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 260 ~ 261 | 262 ~ self.builder.add_predicates_bytes(predicates) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L249
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:249:9 | 247 | let ids = self.builder.add_predicates(predicates); | -------------------------------------------------- unnecessary `let` binding 248 | 249 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 247 ~ 248 | 249 ~ self.builder.add_predicates(predicates) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L233
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:233:9 | 231 | let ids = self.builder.add_nodes_bytes(nodes); | ---------------------------------------------- unnecessary `let` binding 232 | 233 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 231 ~ 232 | 233 ~ self.builder.add_nodes_bytes(nodes) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L220
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:220:9 | 218 | let ids = self.builder.add_nodes(nodes); | ---------------------------------------- unnecessary `let` binding 219 | 220 | ids | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 218 ~ 219 | 220 ~ self.builder.add_nodes(nodes) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L204
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:204:9 | 202 | let id = self.builder.add_value(value); | --------------------------------------- unnecessary `let` binding 203 | 204 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 202 ~ 203 | 204 ~ self.builder.add_value(value) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L191
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:191:9 | 189 | let id = self.builder.add_predicate(predicate); | ----------------------------------------------- unnecessary `let` binding 190 | 191 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 189 ~ 190 | 191 ~ self.builder.add_predicate(predicate) |
returning the result of a `let` binding from a block: src/layer/internal/base.rs#L178
warning: returning the result of a `let` binding from a block --> src/layer/internal/base.rs:178:9 | 176 | let id = self.builder.add_node(node); | ------------------------------------- unnecessary `let` binding 177 | 178 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 176 ~ 177 | 178 ~ self.builder.add_node(node) |
this loop could be written as a `for` loop: src/layer/builder.rs#L473
warning: this loop could be written as a `for` loop --> src/layer/builder.rs:473:9 | 473 | while let Some((object, sp)) = merged_iters.next() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for (object, sp) in merged_iters.by_ref()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator = note: `#[warn(clippy::while_let_on_iterator)]` on by default
returning the result of a `let` binding from a block: src/layer/builder.rs#L87
warning: returning the result of a `let` binding from a block --> src/layer/builder.rs:87:9 | 85 | let id = self.value_dictionary_builder.add(value); | -------------------------------------------------- unnecessary `let` binding 86 | 87 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 85 ~ 86 | 87 ~ self.value_dictionary_builder.add(value) |
returning the result of a `let` binding from a block: src/layer/builder.rs#L78
warning: returning the result of a `let` binding from a block --> src/layer/builder.rs:78:9 | 76 | let id = self.predicate_dictionary_builder.add(predicate); | ---------------------------------------------------------- unnecessary `let` binding 77 | 78 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return help: return the expression directly | 76 ~ 77 | 78 ~ self.predicate_dictionary_builder.add(predicate) |
returning the result of a `let` binding from a block: src/layer/builder.rs#L61
warning: returning the result of a `let` binding from a block --> src/layer/builder.rs:61:9 | 59 | let id = self.node_dictionary_builder.add(node); | ------------------------------------------------ unnecessary `let` binding 60 | 61 | id | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return = note: `#[warn(clippy::let_and_return)]` on by default help: return the expression directly | 59 ~ 60 | 61 ~ self.node_dictionary_builder.add(node) |
this `else { if .. }` block can be collapsed: src/storage/locking.rs#L55
warning: this `else { if .. }` block can be collapsed --> src/storage/locking.rs:55:28 | 55 | } else { | ____________________________^ 56 | | if !cfg!(feature = "noreadlock") { 57 | | file.lock_shared() 58 | | .expect("failed to acquire exclusive lock") 59 | | } 60 | | } | |_____________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 55 ~ } else if !cfg!(feature = "noreadlock") { 56 + file.lock_shared() 57 + .expect("failed to acquire exclusive lock") 58 + } |
constants have by default a `'static` lifetime: src/storage/consts.rs#L584
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:584:41 | 584 | pub const CHILD_LAYER_OPTIONAL_FILES: [&'static str; 4] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L550
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:550:41 | 550 | pub const CHILD_LAYER_REQUIRED_FILES: [&'static str; 31] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L547
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:547:40 | 547 | pub const BASE_LAYER_OPTIONAL_FILES: [&'static str; 2] = | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L529
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:529:40 | 529 | pub const BASE_LAYER_REQUIRED_FILES: [&'static str; 15] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L519
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:519:36 | 519 | pub const SHARED_OPTIONAL_FILES: [&'static str; 7] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
constants have by default a `'static` lifetime: src/storage/consts.rs#L508
warning: constants have by default a `'static` lifetime --> src/storage/consts.rs:508:36 | 508 | pub const SHARED_REQUIRED_FILES: [&'static str; 8] = [ | -^^^^^^^---- help: consider removing `'static`: `&str` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
redundant field names in struct initialization: src/layer/internal/subject_iterator.rs#L27
warning: redundant field names in struct initialization --> src/layer/internal/subject_iterator.rs:27:13 | 27 | sp_o_adjacency_list: sp_o_adjacency_list, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `sp_o_adjacency_list` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/subject_iterator.rs#L26
warning: redundant field names in struct initialization --> src/layer/internal/subject_iterator.rs:26:13 | 26 | s_p_adjacency_list: s_p_adjacency_list, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `s_p_adjacency_list` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/subject_iterator.rs#L25
warning: redundant field names in struct initialization --> src/layer/internal/subject_iterator.rs:25:13 | 25 | subjects: subjects, | ^^^^^^^^^^^^^^^^^^ help: replace it with: `subjects` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/object_iterator.rs#L28
warning: redundant field names in struct initialization --> src/layer/internal/object_iterator.rs:28:13 | 28 | s_p_adjacency_list: s_p_adjacency_list, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `s_p_adjacency_list` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/object_iterator.rs#L27
warning: redundant field names in struct initialization --> src/layer/internal/object_iterator.rs:27:13 | 27 | o_ps_adjacency_list: o_ps_adjacency_list, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `o_ps_adjacency_list` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/object_iterator.rs#L26
warning: redundant field names in struct initialization --> src/layer/internal/object_iterator.rs:26:13 | 26 | objects: objects, | ^^^^^^^^^^^^^^^^ help: replace it with: `objects` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: src/layer/internal/object_iterator.rs#L25
warning: redundant field names in struct initialization --> src/layer/internal/object_iterator.rs:25:13 | 25 | subjects: subjects, | ^^^^^^^^^^^^^^^^^^ help: replace it with: `subjects` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names = note: `#[warn(clippy::redundant_field_names)]` on by default