Skip to content

raise crate version #646

raise crate version

raise crate version #646

Triggered via push March 11, 2024 10:34
Status Success
Total duration 25s
Artifacts

coverage.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

130 warnings
coverage
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
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
deref on an immutable reference: src/storage/delta.rs#L20
warning: deref on an immutable reference --> src/storage/delta.rs:20:17 | 20 | 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 | }; | +
this call to `from_str_radix` can be replaced with a call to `str::parse`: src/storage/directory.rs#L144
warning: this call to `from_str_radix` can be replaced with a call to `str::parse` --> src/storage/directory.rs:144:19 | 144 | 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#L129
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/storage/directory.rs:129:37 | 129 | 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#L672
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/layer/internal/mod.rs:672:35 | 672 | 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#L641
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/layer/internal/mod.rs:641:35 | 641 | 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#L530
warning: match expression looks like `matches!` macro --> src/layer/internal/mod.rs:530:9 | 530 | / match self { 531 | | Rollup(_) => true, 532 | | _ => false, 533 | | } | |_________^ 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#L427
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/internal/subject_iterator.rs:427:42 | 427 | 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) |
lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons`: src/store/mod.rs#L569
warning: lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons` --> src/store/mod.rs:569:13 | 569 | #[allow(clippy::vtable_address_comparisons)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `ambiguous_wide_pointer_comparisons` | = note: `#[warn(renamed_and_removed_lints)]` on by default
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
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
deref on an immutable reference: src/storage/delta.rs#L20
warning: deref on an immutable reference --> src/storage/delta.rs:20:17 | 20 | 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 | }; | +
this call to `from_str_radix` can be replaced with a call to `str::parse`: src/storage/directory.rs#L144
warning: this call to `from_str_radix` can be replaced with a call to `str::parse` --> src/storage/directory.rs:144:19 | 144 | 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#L129
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/storage/directory.rs:129:37 | 129 | 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#L672
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/layer/internal/mod.rs:672:35 | 672 | 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#L641
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> src/layer/internal/mod.rs:641:35 | 641 | 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#L530
warning: match expression looks like `matches!` macro --> src/layer/internal/mod.rs:530:9 | 530 | / match self { 531 | | Rollup(_) => true, 532 | | _ => false, 533 | | } | |_________^ 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#L427
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/layer/internal/subject_iterator.rs:427:42 | 427 | 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) |
lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons`: src/store/mod.rs#L569
warning: lint `clippy::vtable_address_comparisons` has been renamed to `ambiguous_wide_pointer_comparisons` --> src/store/mod.rs:569:13 | 569 | #[allow(clippy::vtable_address_comparisons)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `ambiguous_wide_pointer_comparisons` | = note: `#[warn(renamed_and_removed_lints)]` on by default
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