LNX-165: Improve lnx fs cache #225
Annotations
1 error and 107 warnings
|
fmt
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
|
|
fmt
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/
|
|
fmt
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/
|
|
fmt
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/
|
|
fmt
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/
|
|
deref which would be done by auto-deref:
lnx-fs/src/metastore/mod.rs#L125
warning: deref which would be done by auto-deref
--> lnx-fs/src/metastore/mod.rs:125:34
|
125 | .filter(|entry| pred(&*entry))
| ^^^^^^^ help: try: `entry`
|
= 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
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
lnx-fs/src/metastore/mod.rs#L125
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> lnx-fs/src/metastore/mod.rs:125:34
|
125 | .filter(|entry| pred(&*entry))
| ^^^^^^^ help: change this to: `*entry`
|
= 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
|
|
deref on an immutable reference:
lnx-fs/src/metastore/mod.rs#L125
warning: deref on an immutable reference
--> lnx-fs/src/metastore/mod.rs:125:34
|
125 | .filter(|entry| pred(&*entry))
| ^^^^^^^
|
= 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
help: if you would like to reborrow, try removing `&*`
|
125 - .filter(|entry| pred(&*entry))
125 + .filter(|entry| pred(entry))
|
help: if you would like to deref, try using `&**`
|
125 | .filter(|entry| pred(&**entry))
| +
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/metastore/checkpoint.rs#L246
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/metastore/checkpoint.rs:246:22
|
246 | .map_err(|e| io::Error::new(ErrorKind::Other, e.to_string()))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
246 - .map_err(|e| io::Error::new(ErrorKind::Other, e.to_string()))?;
246 + .map_err(|e| io::Error::other(e.to_string()))?;
|
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/io/runtime.rs#L113
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/io/runtime.rs:113:13
|
113 | io::Error::new(ErrorKind::Other, "Runtime cancelled spawn task")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
113 - io::Error::new(ErrorKind::Other, "Runtime cancelled spawn task")
113 + io::Error::other("Runtime cancelled spawn task")
|
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/io/runtime.rs#L109
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/io/runtime.rs:109:13
|
109 | io::Error::new(ErrorKind::Other, "Worker IO runtime died, this is a bug")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
109 - io::Error::new(ErrorKind::Other, "Worker IO runtime died, this is a bug")
109 + io::Error::other("Worker IO runtime died, this is a bug")
|
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/io/actors/mod.rs#L46
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/io/actors/mod.rs:46:5
|
46 | / io::Error::new(
47 | | ErrorKind::Other,
48 | | "Writers failed to start or aborted, this is a bug",
49 | | )
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
46 ~ io::Error::other(
47 ~ "Writers failed to start or aborted, this is a bug",
|
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/io/actors/tablet_reader.rs#L93
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/io/actors/tablet_reader.rs:93:13
|
93 | io::Error::new(ErrorKind::Other, "Reader closed")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
= note: `#[warn(clippy::io_other_error)]` on by default
help: use `std::io::Error::other`
|
93 - io::Error::new(ErrorKind::Other, "Reader closed")
93 + io::Error::other("Reader closed")
|
|
|
method `file_id` is never used:
lnx-fs/src/page_cache/prepared_read.rs#L176
warning: method `file_id` is never used
--> lnx-fs/src/page_cache/prepared_read.rs:176:12
|
86 | impl PreparedRead {
| ----------------- method in this implementation
...
176 | pub fn file_id(&self) -> u64 {
| ^^^^^^^
|
|
method `is_free` is never used:
lnx-fs/src/page_cache/page.rs#L184
warning: method `is_free` is never used
--> lnx-fs/src/page_cache/page.rs:184:19
|
174 | impl PageFlags {
| -------------- method in this implementation
...
184 | pub(super) fn is_free(&self) -> bool {
| ^^^^^^^
|
|
field `guard` is never read:
lnx-fs/src/page_cache/gc.rs#L89
warning: field `guard` is never read
--> lnx-fs/src/page_cache/gc.rs:89:5
|
87 | struct CacheGCActor {
| ------------ field in this struct
88 | /// The guard marks the GC as dead when dropped.
89 | guard: ThreadLiveGuard,
| ^^^^^
|
= note: `CacheGCActor` has a derived impl for the trait `Default`, but this is intentionally ignored during dead code analysis
|
|
type alias `FileIdAndGenerationPair` is never used:
lnx-fs/src/page_cache/gc.rs#L14
warning: type alias `FileIdAndGenerationPair` is never used
--> lnx-fs/src/page_cache/gc.rs:14:6
|
14 | type FileIdAndGenerationPair = (u64, u64);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
method `mark_to_be_freed` is never used:
lnx-fs/src/page_cache/block.rs#L203
warning: method `mark_to_be_freed` is never used
--> lnx-fs/src/page_cache/block.rs:203:26
|
187 | impl MutPageRef {
| --------------- method in this implementation
...
203 | pub(super) unsafe fn mark_to_be_freed(&mut self, generation: u64) {
| ^^^^^^^^^^^^^^^^
|
|
method `allocated_size` is never used:
lnx-fs/src/page_cache/block.rs#L70
warning: method `allocated_size` is never used
--> lnx-fs/src/page_cache/block.rs:70:12
|
29 | impl VirtualFileBlock {
| --------------------- method in this implementation
...
70 | pub fn allocated_size(&self) -> usize {
| ^^^^^^^^^^^^^^
|
|
methods `num_allocated_bytes`, `invalidates_all`, `invalidates_file`, `delete_cache_entry`, and `delete_cache_entry_inner` are never used:
lnx-fs/src/page_cache/mod.rs#L134
warning: methods `num_allocated_bytes`, `invalidates_all`, `invalidates_file`, `delete_cache_entry`, and `delete_cache_entry_inner` are never used
--> lnx-fs/src/page_cache/mod.rs:134:12
|
94 | impl FilePageCache {
| ------------------ methods in this implementation
...
134 | pub fn num_allocated_bytes(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^
...
147 | pub fn invalidates_all(&self) {
| ^^^^^^^^^^^^^^^
...
153 | pub fn invalidates_file<K: Hash>(&self, file: K) -> Result<(), CacheError> {
| ^^^^^^^^^^^^^^^^
...
270 | pub fn delete_cache_entry<K: Hash>(&self, file: K) {
| ^^^^^^^^^^^^^^^^^^
...
278 | fn delete_cache_entry_inner(&self, file_id: u64, file_hash_state: ahash::AHasher) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L296
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:296:22
|
296 | other => io::Error::new(ErrorKind::Other, other),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
296 - other => io::Error::new(ErrorKind::Other, other),
296 + other => io::Error::other(other),
|
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L238
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:238:18
|
238 | other => io::Error::new(ErrorKind::Other, other),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
238 - other => io::Error::new(ErrorKind::Other, other),
238 + other => io::Error::other(other),
|
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L171
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:171:30
|
171 | other => io::Error::new(ErrorKind::Other, other),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
171 - other => io::Error::new(ErrorKind::Other, other),
171 + other => io::Error::other(other),
|
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L113
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:113:40
|
113 | io_error: Arc::new(io::Error::new(ErrorKind::Other, other)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
113 - io_error: Arc::new(io::Error::new(ErrorKind::Other, other)),
113 + io_error: Arc::new(io::Error::other(other)),
|
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L79
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:79:36
|
79 | io_error: Arc::new(io::Error::new(ErrorKind::Other, other)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
= note: `#[warn(clippy::io_other_error)]` on by default
help: use `std::io::Error::other`
|
79 - io_error: Arc::new(io::Error::new(ErrorKind::Other, other)),
79 + io_error: Arc::new(io::Error::other(other)),
|
|
|
associated function `new` is never used:
lnx-tantivy/src/collectors/top_docs/mod.rs#L197
warning: associated function `new` is never used
--> lnx-tantivy/src/collectors/top_docs/mod.rs:197:8
|
196 | impl<T: PartialOrd + Clone> TopSegmentCollector<T> {
| -------------------------------------------------- associated function in this implementation
197 | fn new(segment_ord: SegmentOrdinal, limit: usize) -> TopSegmentCollector<T> {
| ^^^
|
= note: `#[warn(dead_code)]` on by default
|
|
unused variable: `score`:
lnx-tantivy/src/collectors/top_docs/mod.rs#L462
warning: unused variable: `score`
--> lnx-tantivy/src/collectors/top_docs/mod.rs:462:14
|
462 | for (score, doc) in expected_docs {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_score`
|
= note: `#[warn(unused_variables)]` on by default
|
|
field `0` is never read:
lnx-doc/src/borrowed_value.rs#L334
warning: field `0` is never read
--> lnx-doc/src/borrowed_value.rs:334:28
|
334 | struct CowBytesWrapper<'a>(Cow<'a, [u8]>);
| --------------- ^^^^^^^^^^^^^
| |
| field in this struct
|
= help: consider removing this field
= note: `#[warn(dead_code)]` on by default
|
|
unused import: `debug`:
lnx-tantivy/src/directory/vfs.rs#L21
warning: unused import: `debug`
--> lnx-tantivy/src/directory/vfs.rs:21:15
|
21 | use tracing::{debug, warn};
| ^^^^^
|
|
unused import: `crate::collectors::TopDocs`:
lnx-tantivy/src/collectors/top_docs/custom_sort.rs#L320
warning: unused import: `crate::collectors::TopDocs`
--> lnx-tantivy/src/collectors/top_docs/custom_sort.rs:320:9
|
320 | use crate::collectors::TopDocs;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
unused import: `QueryParser`:
lnx-tantivy/src/collectors/top_docs/custom_sort.rs#L315
warning: unused import: `QueryParser`
--> lnx-tantivy/src/collectors/top_docs/custom_sort.rs:315:36
|
315 | use tantivy::query::{AllQuery, QueryParser};
| ^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
|
unused import: `tantivy::indexer::NoMergePolicy`:
lnx-tantivy/tests/test_indexing_merges.rs#L4
warning: unused import: `tantivy::indexer::NoMergePolicy`
--> lnx-tantivy/tests/test_indexing_merges.rs:4:5
|
4 | use tantivy::indexer::NoMergePolicy;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
|
unused import: `gc`:
lnx-fs/src/page_cache/prepared_read.rs#L12
warning: unused import: `gc`
--> lnx-fs/src/page_cache/prepared_read.rs:12:13
|
12 | use super::{gc, TrackedGeneration};
| ^^
|
|
unused import: `AtomicU8`:
lnx-fs/src/page_cache/page.rs#L3
warning: unused import: `AtomicU8`
--> lnx-fs/src/page_cache/page.rs:3:36
|
3 | use std::sync::atomic::{AtomicU64, AtomicU8, Ordering};
| ^^^^^^^^
|
|
unused import: `smallvec::SmallVec`:
lnx-fs/src/page_cache/gc.rs#L11
warning: unused import: `smallvec::SmallVec`
--> lnx-fs/src/page_cache/gc.rs:11:5
|
11 | use smallvec::SmallVec;
| ^^^^^^^^^^^^^^^^^^
|
|
unused import: `UnwindSafe`:
lnx-fs/src/page_cache/gc.rs#L6
warning: unused import: `UnwindSafe`
--> lnx-fs/src/page_cache/gc.rs:6:36
|
6 | use std::panic::{AssertUnwindSafe, UnwindSafe};
| ^^^^^^^^^^
|
|
unused import: `std::ops::Range`:
lnx-fs/src/page_cache/gc.rs#L5
warning: unused import: `std::ops::Range`
--> lnx-fs/src/page_cache/gc.rs:5:5
|
5 | use std::ops::Range;
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
|
doc list item overindented:
lnx-query/src/syntax.rs#L82
warning: doc list item overindented
--> lnx-query/src/syntax.rs:82:5
|
82 | /// or via the table config.
| ^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
|
|
doc list item overindented:
lnx-query/src/syntax.rs#L81
warning: doc list item overindented
--> lnx-query/src/syntax.rs:81:5
|
81 | /// for a term depending on the term's length. This can be configured via the query
| ^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
= note: `#[warn(clippy::doc_overindented_list_items)]` on by default
|
|
all variants have the same postfix: `Endpoints`:
lnx-server/src/apis/mod.rs#L12
warning: all variants have the same postfix: `Endpoints`
--> lnx-server/src/apis/mod.rs:12:1
|
12 | / pub(super) enum Tag {
13 | | #[oai(rename = "Health Endpoints")]
14 | | /// Service health related endpoints
15 | | ///
... |
40 | | QueryEndpoints,
41 | | }
| |_^
|
= help: remove the postfixes and use full paths to the variants instead of glob imports
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
= note: `#[warn(clippy::enum_variant_names)]` on by default
|
|
unused import: `BucketConfig`:
lnx-fs/lnx-fs-benches/src/main.rs#L13
warning: unused import: `BucketConfig`
--> lnx-fs/lnx-fs-benches/src/main.rs:13:20
|
13 | use lnx_fs::{Body, BucketConfig, Bytes, RuntimeOptions, VirtualFileSystem};
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
|
unused variable: `data_path`:
lnx-server/src/lib.rs#L16
warning: unused variable: `data_path`
--> lnx-server/src/lib.rs:16:46
|
16 | pub async fn run(listen_address: SocketAddr, data_path: PathBuf) -> Result<()> {
| ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_data_path`
|
= note: `#[warn(unused_variables)]` on by default
|
|
unused import: `Object`:
lnx-server/src/apis/query.rs#L3
warning: unused import: `Object`
--> lnx-server/src/apis/query.rs:3:20
|
3 | use poem_openapi::{Object, OpenApi};
| ^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
|
all variants have the same postfix: `Endpoints`:
lnx-server/src/apis/mod.rs#L12
warning: all variants have the same postfix: `Endpoints`
--> lnx-server/src/apis/mod.rs:12:1
|
12 | / pub(super) enum Tag {
13 | | #[oai(rename = "Health Endpoints")]
14 | | /// Service health related endpoints
15 | | ///
... |
40 | | QueryEndpoints,
41 | | }
| |_^
|
= help: remove the postfixes and use full paths to the variants instead of glob imports
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names
= note: `#[warn(clippy::enum_variant_names)]` on by default
|
|
unused variable: `data_path`:
lnx-server/src/lib.rs#L16
warning: unused variable: `data_path`
--> lnx-server/src/lib.rs:16:46
|
16 | pub async fn run(listen_address: SocketAddr, data_path: PathBuf) -> Result<()> {
| ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_data_path`
|
= note: `#[warn(unused_variables)]` on by default
|
|
unused import: `Object`:
lnx-server/src/apis/query.rs#L3
warning: unused import: `Object`
--> lnx-server/src/apis/query.rs:3:20
|
3 | use poem_openapi::{Object, OpenApi};
| ^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
|
unused import: `BucketConfig`:
lnx-fs/lnx-fs-benches/src/main.rs#L13
warning: unused import: `BucketConfig`
--> lnx-fs/lnx-fs-benches/src/main.rs:13:20
|
13 | use lnx_fs::{Body, BucketConfig, Bytes, RuntimeOptions, VirtualFileSystem};
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
|
doc list item overindented:
lnx-query/src/syntax.rs#L110
warning: doc list item overindented
--> lnx-query/src/syntax.rs:110:5
|
110 | /// _This is an alias for `$not: { $eq: <value> }.`_
| ^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
|
|
doc list item overindented:
lnx-query/src/syntax.rs#L82
warning: doc list item overindented
--> lnx-query/src/syntax.rs:82:5
|
82 | /// or via the table config.
| ^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
|
|
doc list item overindented:
lnx-query/src/syntax.rs#L81
warning: doc list item overindented
--> lnx-query/src/syntax.rs:81:5
|
81 | /// for a term depending on the term's length. This can be configured via the query
| ^^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
= note: `#[warn(clippy::doc_overindented_list_items)]` on by default
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L296
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:296:22
|
296 | other => io::Error::new(ErrorKind::Other, other),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
296 - other => io::Error::new(ErrorKind::Other, other),
296 + other => io::Error::other(other),
|
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L238
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:238:18
|
238 | other => io::Error::new(ErrorKind::Other, other),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
238 - other => io::Error::new(ErrorKind::Other, other),
238 + other => io::Error::other(other),
|
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L171
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:171:30
|
171 | other => io::Error::new(ErrorKind::Other, other),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
171 - other => io::Error::new(ErrorKind::Other, other),
171 + other => io::Error::other(other),
|
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L113
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:113:40
|
113 | io_error: Arc::new(io::Error::new(ErrorKind::Other, other)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
113 - io_error: Arc::new(io::Error::new(ErrorKind::Other, other)),
113 + io_error: Arc::new(io::Error::other(other)),
|
|
|
this can be `std::io::Error::other(_)`:
lnx-tantivy/src/directory/vfs.rs#L79
warning: this can be `std::io::Error::other(_)`
--> lnx-tantivy/src/directory/vfs.rs:79:36
|
79 | io_error: Arc::new(io::Error::new(ErrorKind::Other, other)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
= note: `#[warn(clippy::io_other_error)]` on by default
help: use `std::io::Error::other`
|
79 - io_error: Arc::new(io::Error::new(ErrorKind::Other, other)),
79 + io_error: Arc::new(io::Error::other(other)),
|
|
|
associated function `new` is never used:
lnx-tantivy/src/collectors/top_docs/mod.rs#L197
warning: associated function `new` is never used
--> lnx-tantivy/src/collectors/top_docs/mod.rs:197:8
|
196 | impl<T: PartialOrd + Clone> TopSegmentCollector<T> {
| -------------------------------------------------- associated function in this implementation
197 | fn new(segment_ord: SegmentOrdinal, limit: usize) -> TopSegmentCollector<T> {
| ^^^
|
= note: `#[warn(dead_code)]` on by default
|
|
unused import: `debug`:
lnx-tantivy/src/directory/vfs.rs#L21
warning: unused import: `debug`
--> lnx-tantivy/src/directory/vfs.rs:21:15
|
21 | use tracing::{debug, warn};
| ^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
|
deref which would be done by auto-deref:
lnx-fs/src/metastore/mod.rs#L125
warning: deref which would be done by auto-deref
--> lnx-fs/src/metastore/mod.rs:125:34
|
125 | .filter(|entry| pred(&*entry))
| ^^^^^^^ help: try: `entry`
|
= 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
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
lnx-fs/src/metastore/mod.rs#L125
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> lnx-fs/src/metastore/mod.rs:125:34
|
125 | .filter(|entry| pred(&*entry))
| ^^^^^^^ help: change this to: `*entry`
|
= 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
|
|
deref on an immutable reference:
lnx-fs/src/metastore/mod.rs#L125
warning: deref on an immutable reference
--> lnx-fs/src/metastore/mod.rs:125:34
|
125 | .filter(|entry| pred(&*entry))
| ^^^^^^^
|
= 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
help: if you would like to reborrow, try removing `&*`
|
125 - .filter(|entry| pred(&*entry))
125 + .filter(|entry| pred(entry))
|
help: if you would like to deref, try using `&**`
|
125 | .filter(|entry| pred(&**entry))
| +
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/metastore/checkpoint.rs#L246
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/metastore/checkpoint.rs:246:22
|
246 | .map_err(|e| io::Error::new(ErrorKind::Other, e.to_string()))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
246 - .map_err(|e| io::Error::new(ErrorKind::Other, e.to_string()))?;
246 + .map_err(|e| io::Error::other(e.to_string()))?;
|
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/io/runtime.rs#L113
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/io/runtime.rs:113:13
|
113 | io::Error::new(ErrorKind::Other, "Runtime cancelled spawn task")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
113 - io::Error::new(ErrorKind::Other, "Runtime cancelled spawn task")
113 + io::Error::other("Runtime cancelled spawn task")
|
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/io/runtime.rs#L109
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/io/runtime.rs:109:13
|
109 | io::Error::new(ErrorKind::Other, "Worker IO runtime died, this is a bug")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
109 - io::Error::new(ErrorKind::Other, "Worker IO runtime died, this is a bug")
109 + io::Error::other("Worker IO runtime died, this is a bug")
|
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/io/actors/mod.rs#L46
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/io/actors/mod.rs:46:5
|
46 | / io::Error::new(
47 | | ErrorKind::Other,
48 | | "Writers failed to start or aborted, this is a bug",
49 | | )
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
help: use `std::io::Error::other`
|
46 ~ io::Error::other(
47 ~ "Writers failed to start or aborted, this is a bug",
|
|
|
this can be `std::io::Error::other(_)`:
lnx-fs/src/io/actors/tablet_reader.rs#L93
warning: this can be `std::io::Error::other(_)`
--> lnx-fs/src/io/actors/tablet_reader.rs:93:13
|
93 | io::Error::new(ErrorKind::Other, "Reader closed")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error
= note: `#[warn(clippy::io_other_error)]` on by default
help: use `std::io::Error::other`
|
93 - io::Error::new(ErrorKind::Other, "Reader closed")
93 + io::Error::other("Reader closed")
|
|
|
function `get_page_range` is never used:
lnx-fs/src/page_cache/prepared_read.rs#L404
warning: function `get_page_range` is never used
--> lnx-fs/src/page_cache/prepared_read.rs:404:4
|
404 | fn get_page_range(range: Range<usize>, page_size: PageSize) -> Range<PageId> {
| ^^^^^^^^^^^^^^
|
|
function `get_waker` is never used:
lnx-fs/src/page_cache/prepared_read.rs#L399
warning: function `get_waker` is never used
--> lnx-fs/src/page_cache/prepared_read.rs:399:4
|
399 | fn get_waker(file_id: u64) -> &'static Notify {
| ^^^^^^^^^
|
|
field `block` is never read:
lnx-fs/src/page_cache/prepared_read.rs#L396
warning: field `block` is never read
--> lnx-fs/src/page_cache/prepared_read.rs:396:5
|
394 | struct OpGuards {
| -------- field in this struct
395 | generation: Arc<TrackedGeneration>,
396 | block: Arc<VirtualFileBlock>,
| ^^^^^
|
= note: `OpGuards` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
|
|
methods `read_bytes_range`, `write`, and `write_unchecked` are never used:
lnx-fs/src/page_cache/prepared_read.rs#L328
warning: methods `read_bytes_range`, `write`, and `write_unchecked` are never used
--> lnx-fs/src/page_cache/prepared_read.rs:328:12
|
325 | impl WriteRequest {
| ----------------- methods in this implementation
...
328 | pub fn read_bytes_range(&self) -> Range<usize> {
| ^^^^^^^^^^^^^^^^
...
335 | pub fn write(self, buffer: &[u8]) {
| ^^^^^
...
354 | unsafe fn write_unchecked(mut self, buffer: &[u8]) {
| ^^^^^^^^^^^^^^^
|
|
fields `waker`, `read_bytes_range`, and `mut_page` are never read:
lnx-fs/src/page_cache/prepared_read.rs#L318
warning: fields `waker`, `read_bytes_range`, and `mut_page` are never read
--> lnx-fs/src/page_cache/prepared_read.rs:318:5
|
310 | pub struct WriteRequest {
| ------------ fields in this struct
...
318 | waker: &'static Notify,
| ^^^^^
319 | /// The range of bytes to read in order to populate the page.
320 | read_bytes_range: Range<usize>,
| ^^^^^^^^^^^^^^^^
321 | /// The mutable page memory pointer.
322 | mut_page: MutPageRef,
| ^^^^^^^^
|
|
multiple associated items are never used:
lnx-fs/src/page_cache/prepared_read.rs#L87
warning: multiple associated items are never used
--> lnx-fs/src/page_cache/prepared_read.rs:87:19
|
86 | impl PreparedRead {
| ----------------- associated items in this implementation
87 | pub(super) fn from_block_and_generation(
| ^^^^^^^^^^^^^^^^^^^^^^^^^
...
176 | pub fn file_id(&self) -> u64 {
| ^^^^^^^
...
182 | pub fn generation_id(&self) -> u64 {
| ^^^^^^^^^^^^^
...
189 | pub fn next_outstanding_write(&mut self) -> Option<WriteRequest> {
| ^^^^^^^^^^^^^^^^^^^^^^
...
195 | pub fn page_range(&self) -> Range<usize> {
| ^^^^^^^^^^
...
201 | pub async fn try_finish(&mut self) -> Result<ReadRef, OutstandingWritesError> {
| ^^^^^^^^^^
...
237 | fn check_inflight_locks(&mut self) {
| ^^^^^^^^^^^^^^^^^^^^
...
291 | fn err_if_outstanding_writes(&self) -> Result<(), OutstandingWritesError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
...
299 | fn file_block(&self) -> &VirtualFileBlock {
| ^^^^^^^^^^
|
|
static `PAGE_WRITE_WAKER` is never used:
lnx-fs/src/page_cache/prepared_read.rs#L24
warning: static `PAGE_WRITE_WAKER` is never used
--> lnx-fs/src/page_cache/prepared_read.rs:24:8
|
24 | static PAGE_WRITE_WAKER: [Notify; 32] = [const { Notify::const_new() }; 32];
| ^^^^^^^^^^^^^^^^
|
|
associated items `ALLOCATED`, `UNALLOCATED`, `is_allocated`, `is_free`, `is_dirty`, and `dirty_marker_generation` are never used:
lnx-fs/src/page_cache/page.rs#L175
warning: associated items `ALLOCATED`, `UNALLOCATED`, `is_allocated`, `is_free`, `is_dirty`, and `dirty_marker_generation` are never used
--> lnx-fs/src/page_cache/page.rs:175:11
|
174 | impl PageFlags {
| -------------- associated items in this implementation
175 | const ALLOCATED: u64 = u64::MAX;
| ^^^^^^^^^
176 | const UNALLOCATED: u64 = 0;
| ^^^^^^^^^^^
...
179 | pub(super) fn is_allocated(&self) -> bool {
| ^^^^^^^^^^^^
...
184 | pub(super) fn is_free(&self) -> bool {
| ^^^^^^^
...
189 | pub(super) fn is_dirty(&self) -> bool {
| ^^^^^^^^
...
195 | pub(super) fn dirty_marker_generation(&self) -> Option<u64> {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
struct `PageFlags` is never constructed:
lnx-fs/src/page_cache/page.rs#L172
warning: struct `PageFlags` is never constructed
--> lnx-fs/src/page_cache/page.rs:172:19
|
172 | pub(super) struct PageFlags(u64);
| ^^^^^^^^^
|
|
methods `load`, `set_free`, `set_allocated`, and `set_dirty` are never used:
lnx-fs/src/page_cache/page.rs#L154
warning: methods `load`, `set_free`, `set_allocated`, and `set_dirty` are never used
--> lnx-fs/src/page_cache/page.rs:154:19
|
152 | impl AtomicPageFlags {
| -------------------- methods in this implementation
153 | /// Performs a relaxed load of the page flags.
154 | pub(super) fn load(&self) -> PageFlags {
| ^^^^
...
158 | fn set_free(&self) {
| ^^^^^^^^
...
162 | fn set_allocated(&self) {
| ^^^^^^^^^^^^^
...
166 | fn set_dirty(&self, generation: u64) {
| ^^^^^^^^^
|
|
field `0` is never read:
lnx-fs/src/page_cache/page.rs#L150
warning: field `0` is never read
--> lnx-fs/src/page_cache/page.rs:150:35
|
150 | pub(super) struct AtomicPageFlags(AtomicU64);
| --------------- ^^^^^^^^^
| |
| field in this struct
|
= help: consider removing this field
= note: `AtomicPageFlags` has a derived impl for the trait `Default`, but this is intentionally ignored during dead code analysis
|
|
associated items `new`, `len`, `at`, and `pointer_to_index` are never used:
lnx-fs/src/page_cache/page.rs#L111
warning: associated items `new`, `len`, `at`, and `pointer_to_index` are never used
--> lnx-fs/src/page_cache/page.rs:111:19
|
109 | impl PageStateTable {
| ------------------- associated items in this implementation
110 | /// Creates a new page state table with the given num pages.
111 | pub(super) fn new(num_pages: usize) -> Self {
| ^^^
...
124 | pub(super) fn len(&self) -> usize {
| ^^^
...
130 | pub(super) fn at(&self, idx: PageId) -> &PageState {
| ^^
...
139 | pub(super) fn pointer_to_index(&self, page: *const PageState) -> PageId {
| ^^^^^^^^^^^^^^^^
|
|
field `table` is never read:
lnx-fs/src/page_cache/page.rs#L106
warning: field `table` is never read
--> lnx-fs/src/page_cache/page.rs:106:5
|
105 | pub(super) struct PageStateTable {
| -------------- field in this struct
106 | table: Box<[PageState]>,
| ^^^^^
|
|
multiple associated items are never used:
lnx-fs/src/page_cache/page.rs#L20
warning: multiple associated items are never used
--> lnx-fs/src/page_cache/page.rs:20:8
|
19 | impl PageState {
| -------------- associated items in this implementation
20 | fn empty() -> Self {
| ^^^^^
...
29 | pub(super) fn is_locked(&self) -> bool {
| ^^^^^^^^^
...
35 | pub(super) fn flags(&self) -> PageFlags {
| ^^^^^
...
43 | pub(super) unsafe fn mark_free_if_dirty(&self) {
| ^^^^^^^^^^^^^^^^^^
...
55 | pub(super) unsafe fn mark_free_unchecked(&self) {
| ^^^^^^^^^^^^^^^^^^^
...
64 | pub(super) unsafe fn mark_allocated_unchecked(&self) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
73 | pub(super) unsafe fn mark_dirty_unchecked(&self, generation: u64) {
| ^^^^^^^^^^^^^^^^^^^^
...
85 | pub(super) unsafe fn try_acquire_static_write_guard(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
93 | pub(super) fn acquire_write_guard(&self) -> PageWriteLockGuard<'_> {
| ^^^^^^^^^^^^^^^^^^^
...
99 | pub(super) fn try_acquire_write_guard(&self) -> Option<PageWriteLockGuard<'_>> {
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
fields `lock` and `flags` are never read:
lnx-fs/src/page_cache/page.rs#L14
warning: fields `lock` and `flags` are never read
--> lnx-fs/src/page_cache/page.rs:14:5
|
12 | pub(super) struct PageState {
| --------- fields in this struct
13 | /// The write lock guard for synchronizing writes.
14 | lock: PageMutex,
| ^^^^
15 | /// The flags set for the given page.
16 | flags: AtomicPageFlags,
| ^^^^^
|
|
variants `RegisterGeneration`, `RegisterTrigger`, and `ForceCollection` are never constructed:
lnx-fs/src/page_cache/gc.rs#L247
warning: variants `RegisterGeneration`, `RegisterTrigger`, and `ForceCollection` are never constructed
--> lnx-fs/src/page_cache/gc.rs:247:5
|
233 | enum GCEvent {
| ------- variants in this enum
...
247 | RegisterGeneration {
| ^^^^^^^^^^^^^^^^^^
...
257 | RegisterTrigger {
| ^^^^^^^^^^^^^^^
...
267 | ForceCollection {
| ^^^^^^^^^^^^^^^
|
|
field `guard` is never read:
lnx-fs/src/page_cache/gc.rs#L89
warning: field `guard` is never read
--> lnx-fs/src/page_cache/gc.rs:89:5
|
87 | struct CacheGCActor {
| ------------ field in this struct
88 | /// The guard marks the GC as dead when dropped.
89 | guard: ThreadLiveGuard,
| ^^^^^
|
= note: `CacheGCActor` has a derived impl for the trait `Default`, but this is intentionally ignored during dead code analysis
|
|
function `force_collection` is never used:
lnx-fs/src/page_cache/gc.rs#L78
warning: function `force_collection` is never used
--> lnx-fs/src/page_cache/gc.rs:78:15
|
78 | pub(crate) fn force_collection() -> impl Future<Output = ()> + Send + 'static {
| ^^^^^^^^^^^^^^^^
|
|
function `register_trigger` is never used:
lnx-fs/src/page_cache/gc.rs#L61
warning: function `register_trigger` is never used
--> lnx-fs/src/page_cache/gc.rs:61:15
|
61 | pub(crate) fn register_trigger<CB>(
| ^^^^^^^^^^^^^^^^
|
|
function `track_generation` is never used:
lnx-fs/src/page_cache/gc.rs#L49
warning: function `track_generation` is never used
--> lnx-fs/src/page_cache/gc.rs:49:15
|
49 | pub(crate) fn track_generation(file_id: u64, generation_id: u64) {
| ^^^^^^^^^^^^^^^^
|
|
type alias `FileIdAndGenerationPair` is never used:
lnx-fs/src/page_cache/gc.rs#L14
warning: type alias `FileIdAndGenerationPair` is never used
--> lnx-fs/src/page_cache/gc.rs:14:6
|
14 | type FileIdAndGenerationPair = (u64, u64);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
methods `size`, `mark_to_be_freed`, and `write` are never used:
lnx-fs/src/page_cache/block.rs#L190
warning: methods `size`, `mark_to_be_freed`, and `write` are never used
--> lnx-fs/src/page_cache/block.rs:190:12
|
187 | impl MutPageRef {
| --------------- methods in this implementation
...
190 | pub fn size(&self) -> usize {
| ^^^^
...
203 | pub(super) unsafe fn mark_to_be_freed(&mut self, generation: u64) {
| ^^^^^^^^^^^^^^^^
...
216 | pub(super) unsafe fn write(&mut self, buffer: &[u8]) {
| ^^^^^
|
|
fields `state`, `mem_ptr`, and `mem_len` are never read:
lnx-fs/src/page_cache/block.rs#L182
warning: fields `state`, `mem_ptr`, and `mem_len` are never read
--> lnx-fs/src/page_cache/block.rs:182:5
|
181 | pub(super) struct MutPageRef {
| ---------- fields in this struct
182 | state: *const PageState,
| ^^^^^
183 | mem_ptr: *mut u8,
| ^^^^^^^
184 | mem_len: usize,
| ^^^^^^^
|
|
function `get_num_pages` is never used:
lnx-fs/src/page_cache/block.rs#L172
warning: function `get_num_pages` is never used
--> lnx-fs/src/page_cache/block.rs:172:4
|
172 | fn get_num_pages(size: usize, page_size: usize) -> usize {
| ^^^^^^^^^^^^^
|
|
multiple associated items are never used:
lnx-fs/src/page_cache/block.rs#L30
warning: multiple associated items are never used
--> lnx-fs/src/page_cache/block.rs:30:19
|
29 | impl VirtualFileBlock {
| --------------------- associated items in this implementation
30 | pub(super) fn allocate(size: usize, page_size: PageSize) -> io::Result<Self> {
| ^^^^^^^^
...
49 | pub fn virtual_address_space_usage(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
55 | pub fn page_size(&self) -> PageSize {
| ^^^^^^^^^
...
61 | pub fn file_size(&self) -> usize {
| ^^^^^^^^^
...
70 | pub fn allocated_size(&self) -> usize {
| ^^^^^^^^^^^^^^
...
78 | pub fn page_to_bytes_range(&self, page_id: PageId) -> Range<usize> {
| ^^^^^^^^^^^^^^^^^^^
...
87 | pub fn num_pages(&self) -> usize {
| ^^^^^^^^^
...
93 | pub fn page_at(&self, page_id: PageId) -> &PageState {
| ^^^^^^^
...
99 | pub(super) unsafe fn pointer_to_page_id(&self, ptr: *const PageState) -> PageId {
| ^^^^^^^^^^^^^^^^^^
...
112 | pub(super) unsafe fn get_page_ptr(&self, page_id: PageId) -> *const u8 {
| ^^^^^^^^^^^^
...
130 | pub(super) unsafe fn get_mut_page(&self, page_id: PageId) -> MutPageRef {
| ^^^^^^^^^^^^
...
151 | pub(super) unsafe fn free_page(&self, page_id: PageId) -> bool {
| ^^^^^^^^^
|
|
fields `mem`, `page_state_table`, `page_size`, and `file_size` are never read:
lnx-fs/src/page_cache/block.rs#L17
warning: fields `mem`, `page_state_table`, `page_size`, and `file_size` are never read
--> lnx-fs/src/page_cache/block.rs:17:5
|
13 | pub(super) struct VirtualFileBlock {
| ---------------- fields in this struct
...
17 | mem: memmap2::MmapMut,
| ^^^
18 | /// A set of page states for the memory.
19 | page_state_table: PageStateTable,
| ^^^^^^^^^^^^^^^^
...
22 | page_size: PageSize,
| ^^^^^^^^^
...
26 | file_size: usize,
| ^^^^^^^^^
|
|
associated items `allocate`, `prepare_read`, and `mark_for_deletion` are never used:
lnx-fs/src/page_cache/mod.rs#L301
warning: associated items `allocate`, `prepare_read`, and `mark_for_deletion` are never used
--> lnx-fs/src/page_cache/mod.rs:301:8
|
300 | impl FileBlockState {
| ------------------- associated items in this implementation
301 | fn allocate(file_id: u64, file_len: usize, page_size: PageSize) -> io::Result<Self> {
| ^^^^^^^^
...
312 | fn prepare_read(&self, bytes_range: Range<usize>) -> PreparedRead {
| ^^^^^^^^^^^^
...
331 | fn mark_for_deletion(&self, page_id: PageId) {
| ^^^^^^^^^^^^^^^^^
|
|
struct `FileBlockState` is never constructed:
lnx-fs/src/page_cache/mod.rs#L293
warning: struct `FileBlockState` is never constructed
--> lnx-fs/src/page_cache/mod.rs:293:8
|
293 | struct FileBlockState {
| ^^^^^^^^^^^^^^
|
|
multiple associated items are never used:
lnx-fs/src/page_cache/mod.rs#L96
warning: multiple associated items are never used
--> lnx-fs/src/page_cache/mod.rs:96:12
|
94 | impl FilePageCache {
| ------------------ associated items in this implementation
95 | /// Create a new [FilePageCache] with the given cache size and page size.
96 | pub fn new(cache_size_bytes: usize, page_size: PageSize) -> Self {
| ^^^
...
128 | pub fn num_allocated_pages(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^
...
134 | pub fn num_allocated_bytes(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^
...
147 | pub fn invalidates_all(&self) {
| ^^^^^^^^^^^^^^^
...
153 | pub fn invalidates_file<K: Hash>(&self, file: K) -> Result<(), CacheError> {
| ^^^^^^^^^^^^^^^^
...
185 | pub fn prepare_read<K: Hash>(
| ^^^^^^^^^^^^
...
197 | fn prepare_read_inner(
| ^^^^^^^^^^^^^^^^^^
...
237 | pub fn create_cache_entry<K: Hash>(
| ^^^^^^^^^^^^^^^^^^
...
247 | fn create_cache_entry_inner(
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
270 | pub fn delete_cache_entry<K: Hash>(&self, file: K) {
| ^^^^^^^^^^^^^^^^^^
...
278 | fn delete_cache_entry_inner(&self, file_id: u64, file_hash_state: ahash::AHasher) {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
struct `FilePageCache` is never constructed:
lnx-fs/src/page_cache/mod.rs#L82
warning: struct `FilePageCache` is never constructed
--> lnx-fs/src/page_cache/mod.rs:82:12
|
82 | pub struct FilePageCache {
| ^^^^^^^^^^^^^
|
|
variants `FileNotFound`, `FileAlreadyExists`, and `OutOfBounds` are never constructed:
lnx-fs/src/page_cache/mod.rs#L46
warning: variants `FileNotFound`, `FileAlreadyExists`, and `OutOfBounds` are never constructed
--> lnx-fs/src/page_cache/mod.rs:46:5
|
43 | pub enum CacheError {
| ---------- variants in this enum
...
46 | FileNotFound,
| ^^^^^^^^^^^^
...
49 | FileAlreadyExists,
| ^^^^^^^^^^^^^^^^^
...
52 | OutOfBounds {
| ^^^^^^^^^^^
|
= note: `CacheError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
|
|
type alias `FileId` is never used:
lnx-fs/src/page_cache/mod.rs#L39
warning: type alias `FileId` is never used
--> lnx-fs/src/page_cache/mod.rs:39:6
|
39 | type FileId = u64;
| ^^^^^^
|
|
type alias `CacheEntryKey` is never used:
lnx-fs/src/page_cache/mod.rs#L38
warning: type alias `CacheEntryKey` is never used
--> lnx-fs/src/page_cache/mod.rs:38:6
|
38 | type CacheEntryKey = u64;
| ^^^^^^^^^^^^^
|
|
associated items `from_available_memory`, `num_bytes`, and `is_aligned` are never used:
lnx-fs/src/config.rs#L44
warning: associated items `from_available_memory`, `num_bytes`, and `is_aligned` are never used
--> lnx-fs/src/config.rs:44:12
|
42 | impl PageSize {
| ------------- associated items in this implementation
43 | /// Returns the page size based on the available memory.
44 | pub fn from_available_memory(size_in_bytes: usize) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^
...
62 | pub fn num_bytes(&self) -> usize {
| ^^^^^^^^^
...
68 | pub fn is_aligned(&self, pos: usize) -> bool {
| ^^^^^^^^^^
|
|
variants `Size8KB`, `Size16KB`, `Size32KB`, and `Size64KB` are never constructed:
lnx-fs/src/config.rs#L33
warning: variants `Size8KB`, `Size16KB`, `Size32KB`, and `Size64KB` are never constructed
--> lnx-fs/src/config.rs:33:5
|
31 | pub enum PageSize {
| -------- variants in this enum
32 | /// Use 8KB page size.
33 | Size8KB = 8 << 10,
| ^^^^^^^
34 | /// Use 16KB page size.
35 | Size16KB = 16 << 10,
| ^^^^^^^^
36 | /// Use 32KB page size.
37 | Size32KB = 32 << 10,
| ^^^^^^^^
38 | /// Use 64KB page size.
39 | Size64KB = 64 << 10,
| ^^^^^^^^
|
= note: `PageSize` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
|
|
unused import: `gc`:
lnx-fs/src/page_cache/prepared_read.rs#L12
warning: unused import: `gc`
--> lnx-fs/src/page_cache/prepared_read.rs:12:13
|
12 | use super::{gc, TrackedGeneration};
| ^^
|
|
unused import: `AtomicU8`:
lnx-fs/src/page_cache/page.rs#L3
warning: unused import: `AtomicU8`
--> lnx-fs/src/page_cache/page.rs:3:36
|
3 | use std::sync::atomic::{AtomicU64, AtomicU8, Ordering};
| ^^^^^^^^
|
|
unused import: `smallvec::SmallVec`:
lnx-fs/src/page_cache/gc.rs#L11
warning: unused import: `smallvec::SmallVec`
--> lnx-fs/src/page_cache/gc.rs:11:5
|
11 | use smallvec::SmallVec;
| ^^^^^^^^^^^^^^^^^^
|
|
unused import: `UnwindSafe`:
lnx-fs/src/page_cache/gc.rs#L6
warning: unused import: `UnwindSafe`
--> lnx-fs/src/page_cache/gc.rs:6:36
|
6 | use std::panic::{AssertUnwindSafe, UnwindSafe};
| ^^^^^^^^^^
|
|
clippy
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/
|
|
clippy
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/
|
|
clippy
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/
|
|
clippy
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/
|