save array length as 0th element of property index structure #601
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
1 error and 74 warnings
clippy
Clippy had exited with the 101 exit code
|
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#L1210
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/storage/archive.rs:1210:40
|
1210 | 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#L1209
warning: called `skip(..).next()` on an iterator
--> src/storage/archive.rs:1209:41
|
1209 | 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#L1048
warning: redundant pattern matching, consider using `is_pending()`
--> src/storage/archive.rs:1048:16
|
1048 | if let Poll::Pending = read {
| -------^^^^^^^^^^^^^------- help: try this: `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#L670
warning: if let .. else expression looks like `matches!` macro
--> src/storage/archive.rs:670:9
|
670 | / if let ConstructionFileState::Finalized(_) = &*guard {
671 | | true
672 | | } else {
673 | | false
674 | | }
| |_________^ help: try this: `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 this: `&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 this: `&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 this: `&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 this: `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#L2048
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/storage/layer.rs:2048:50
|
2048 | 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#L2047
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/storage/layer.rs:2047:51
|
2047 | 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#L2006
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> src/storage/layer.rs:2006:32
|
2006 | 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#L2005
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> src/storage/layer.rs:2005:33
|
2005 | 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#L2004
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> src/storage/layer.rs:2004:32
|
2004 | 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#L1603
warning: useless conversion to the same type: `layer::internal::InternalLayer`
--> src/storage/layer.rs:1603:25
|
1603 | / ChildLayer::load_from_files(rollup_id, ancestor, &files)
1604 | | .await?
1605 | | .into(),
| |___________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1603 ~ ChildLayer::load_from_files(rollup_id, ancestor, &files)
1604 ~ .await?,
|
|
useless conversion to the same type: `layer::internal::InternalLayer`:
src/storage/layer.rs#L1595
warning: useless conversion to the same type: `layer::internal::InternalLayer`
--> src/storage/layer.rs:1595:38
|
1595 | 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#L1567
warning: useless conversion to the same type: `layer::internal::InternalLayer`
--> src/storage/layer.rs:1567:34
|
1567 | 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#L1562
warning: useless conversion to the same type: `layer::internal::InternalLayer`
--> src/storage/layer.rs:1562:38
|
1562 | 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#L1534
warning: unneeded late initialization
--> src/storage/layer.rs:1534:25
|
1534 | 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
|
1535 | let original_parent = if self.layer_has_parent(current_layer).await? {
| +++++++++++++++++++++
help: remove the assignments from the branches
|
1536 ~ Some(self.read_parent_file(current_layer).await?)
1537 | } else {
1538 ~ None
|
help: add a semicolon after the `if` expression
|
1539 | };
| +
|
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true:
src/storage/file.rs#L545
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> src/storage/file.rs:545:1
|
545 | impl Into<AdjacencyListBuffers> 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>`
|
545 ~ impl From<AdjacencyListMaps> for AdjacencyListBuffers {
546 ~ fn from(val: AdjacencyListMaps) -> Self {
547 | AdjacencyListBuffers {
548 ~ nums: val.nums_map,
549 ~ bits: val.bitindex_maps.bits_map,
550 ~ bitindex_blocks: val.bitindex_maps.blocks_map,
551 ~ bitindex_sblocks: 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#L534
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> src/storage/file.rs:534:1
|
534 | 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>`
|
534 ~ impl From<AdjacencyListMaps> for AdjacencyList {
535 ~ fn from(val: AdjacencyListMaps) -> Self {
536 | AdjacencyList::parse(
537 ~ val.nums_map,
538 ~ val.bitindex_maps.bits_map,
539 ~ val.bitindex_maps.blocks_map,
540 ~ 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#L485
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> src/storage/file.rs:485:1
|
485 | impl Into<BitIndex> for BitIndexMaps {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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::BitIndexMaps>`
|
485 ~ impl From<BitIndexMaps> for BitIndex {
486 ~ fn from(val: BitIndexMaps) -> Self {
487 ~ BitIndex::from_maps(val.bits_map, val.blocks_map, val.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#L435
warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> src/storage/file.rs:435:1
|
435 | impl Into<IndexPropertyBuffers> for IndexPropertyMaps {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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::IndexPropertyMaps>`
|
435 ~ impl From<IndexPropertyMaps> for IndexPropertyBuffers {
436 ~ fn from(val: IndexPropertyMaps) -> Self {
437 | IndexPropertyBuffers {
438 ~ subjects_logarray_buf: val.subjects_logarray_map,
439 ~ adjacency_bufs: val.adjacency_maps.into(),
440 ~ objects_logarray_buf: val.objects_logarray_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#L303
warning: `if` chain can be rewritten with `match`
--> src/layer/simple_builder.rs:303:13
|
303 | / if addition < removal {
304 | | additions_it.next();
305 | | } else if addition > removal {
306 | | let removal = removals_it.next().unwrap();
... |
319 | | *removal = IdTriple::new(0, 0, 0);
320 | | }
| |_____________^
|
= 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#L340
warning: mutable key type
--> src/layer/layer.rs:340:20
|
340 | 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#L304
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/layer/layer.rs:304:65
|
304 | 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#L679
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> src/layer/internal/mod.rs:679:35
|
679 | 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#L648
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> src/layer/internal/mod.rs:648:35
|
648 | 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#L537
warning: match expression looks like `matches!` macro
--> src/layer/internal/mod.rs:537:9
|
537 | / match self {
538 | | Rollup(_) => true,
539 | | _ => false,
540 | | }
| |_________^ help: try this: `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#L287
warning: returning the result of a `let` binding from a block
--> src/layer/internal/base.rs:287:9
|
285 | let ids = self.builder.add_values(values);
| ------------------------------------------ unnecessary `let` binding
286 |
287 | ids
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
|
285 ~
286 |
287 ~ self.builder.add_values(values)
|
|
returning the result of a `let` binding from a block:
src/layer/internal/base.rs#L271
warning: returning the result of a `let` binding from a block
--> src/layer/internal/base.rs:271:9
|
269 | let ids = self.builder.add_predicates_bytes(predicates);
| -------------------------------------------------------- unnecessary `let` binding
270 |
271 | ids
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
|
269 ~
270 |
271 ~ self.builder.add_predicates_bytes(predicates)
|
|
returning the result of a `let` binding from a block:
src/layer/internal/base.rs#L258
warning: returning the result of a `let` binding from a block
--> src/layer/internal/base.rs:258:9
|
256 | let ids = self.builder.add_predicates(predicates);
| -------------------------------------------------- unnecessary `let` binding
257 |
258 | ids
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
|
256 ~
257 |
258 ~ self.builder.add_predicates(predicates)
|
|
returning the result of a `let` binding from a block:
src/layer/internal/base.rs#L242
warning: returning the result of a `let` binding from a block
--> src/layer/internal/base.rs:242:9
|
240 | let ids = self.builder.add_nodes_bytes(nodes);
| ---------------------------------------------- unnecessary `let` binding
241 |
242 | ids
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
|
240 ~
241 |
242 ~ self.builder.add_nodes_bytes(nodes)
|
|
returning the result of a `let` binding from a block:
src/layer/internal/base.rs#L229
warning: returning the result of a `let` binding from a block
--> src/layer/internal/base.rs:229:9
|
227 | let ids = self.builder.add_nodes(nodes);
| ---------------------------------------- unnecessary `let` binding
228 |
229 | ids
| ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
|
227 ~
228 |
229 ~ self.builder.add_nodes(nodes)
|
|
returning the result of a `let` binding from a block:
src/layer/internal/base.rs#L213
warning: returning the result of a `let` binding from a block
--> src/layer/internal/base.rs:213:9
|
211 | let id = self.builder.add_value(value);
| --------------------------------------- unnecessary `let` binding
212 |
213 | id
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
|
211 ~
212 |
213 ~ self.builder.add_value(value)
|
|
returning the result of a `let` binding from a block:
src/layer/internal/base.rs#L200
warning: returning the result of a `let` binding from a block
--> src/layer/internal/base.rs:200:9
|
198 | let id = self.builder.add_predicate(predicate);
| ----------------------------------------------- unnecessary `let` binding
199 |
200 | id
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
|
198 ~
199 |
200 ~ self.builder.add_predicate(predicate)
|
|
returning the result of a `let` binding from a block:
src/layer/internal/base.rs#L187
warning: returning the result of a `let` binding from a block
--> src/layer/internal/base.rs:187:9
|
185 | let id = self.builder.add_node(node);
| ------------------------------------- unnecessary `let` binding
186 |
187 | id
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
help: return the expression directly
|
185 ~
186 |
187 ~ 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)
|
|
unused variable: `subject`:
src/layer/internal/mod.rs#L972
warning: unused variable: `subject`
--> src/layer/internal/mod.rs:972:34
|
972 | fn indexed_property_s(&self, subject: u64) -> Box<dyn Iterator<Item = IndexIdTriple> + Send> {
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_subject`
|
= note: `#[warn(unused_variables)]` 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#L631
warning: constants have by default a `'static` lifetime
--> src/storage/consts.rs:631:41
|
631 | 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#L597
warning: constants have by default a `'static` lifetime
--> src/storage/consts.rs:597:41
|
597 | 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#L594
warning: constants have by default a `'static` lifetime
--> src/storage/consts.rs:594:40
|
594 | 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#L576
warning: constants have by default a `'static` lifetime
--> src/storage/consts.rs:576:40
|
576 | 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#L566
warning: constants have by default a `'static` lifetime
--> src/storage/consts.rs:566:36
|
566 | 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#L555
warning: constants have by default a `'static` lifetime
--> src/storage/consts.rs:555:36
|
555 | 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/
|