Skip to content

WIP: sketch out on-disk hextree #185

WIP: sketch out on-disk hextree

WIP: sketch out on-disk hextree #185

Triggered via pull request July 25, 2023 21:25
Status Failure
Total duration 39s
Artifacts

rust.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 11 warnings
casting to the same type is unnecessary (`u64` -> `u64`): src/disktree/tree.rs#L127
error: casting to the same type is unnecessary (`u64` -> `u64`) --> src/disktree/tree.rs:127:9 | 127 | (HDR_SZ as u64) + (DPTR_SZ as u64) * (cell.base() as u64) | ^^^^^^^^^^^^^^^ help: try: `HDR_SZ` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D clippy::all`
name `DPTR` contains a capitalized acronym: src/disktree/tree.rs#L16
error: name `DPTR` contains a capitalized acronym --> src/disktree/tree.rs:16:6 | 16 | type DPTR = [u8; 5]; | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Dptr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms = note: `-D clippy::upper-case-acronyms` implied by `-D clippy::all`
build
Clippy had exited with the 101 exit code
function `read_dptr` is never used: src/disktree/tree.rs#L143
warning: function `read_dptr` is never used --> src/disktree/tree.rs:143:15 | 143 | pub(crate) fn read_dptr(src: &mut impl Read) -> DiskTreeResult<u64> { | ^^^^^^^^^
methods `into_inner` and `read_dptr` are never used: src/disktree/tree.rs#L133
warning: methods `into_inner` and `read_dptr` are never used --> src/disktree/tree.rs:133:12 | 131 | impl<R: Read> DiskTree<R> { | ------------------------- methods in this implementation 132 | /// Conumes `self` and returns the backing store. 133 | pub fn into_inner(self) -> R { | ^^^^^^^^^^ ... 137 | fn read_dptr(&mut self) -> DiskTreeResult<u64> { | ^^^^^^^^^
associated items `from_reader`, `get`, `position`, and `base_cell_offset` are never used: src/disktree/tree.rs#L82
warning: associated items `from_reader`, `get`, `position`, and `base_cell_offset` are never used --> src/disktree/tree.rs:82:12 | 80 | impl<R: Read + Seek> DiskTree<R> { | -------------------------------- associated items in this implementation 81 | /// Opens a `DiskTree` with a provided reader. 82 | pub fn from_reader(src: R) -> DiskTreeResult<Self> { | ^^^^^^^^^^^ ... 99 | pub fn get<V>(&mut self, cell: Cell) -> DiskTreeResult<Option<(Cell, V)>> | ^^^ ... 121 | fn position(&mut self) -> DiskTreeResult<u64> { | ^^^^^^^^ ... 126 | fn base_cell_offset(cell: Cell) -> u64 { | ^^^^^^^^^^^^^^^^
associated function `open` is never used: src/disktree/tree.rs#L74
warning: associated function `open` is never used --> src/disktree/tree.rs:74:12 | 72 | impl DiskTree<File> { | ------------------- associated function in this implementation 73 | /// Opens a `DiskTree` at the specified path. 74 | pub fn open<P: AsRef<Path>>(path: P) -> DiskTreeResult<Self> { | ^^^^
struct `DiskTree` is never constructed: src/disktree/tree.rs#L68
warning: struct `DiskTree` is never constructed --> src/disktree/tree.rs:68:12 | 68 | pub struct DiskTree<R> { | ^^^^^^^^
constant `HDR_SZ` is never used: src/disktree/tree.rs#L20
warning: constant `HDR_SZ` is never used --> src/disktree/tree.rs:20:7 | 20 | const HDR_SZ: u64 = 1; | ^^^^^^
constant `DPTR_SZ` is never used: src/disktree/tree.rs#L17
warning: constant `DPTR_SZ` is never used --> src/disktree/tree.rs:17:7 | 17 | const DPTR_SZ: usize = std::mem::size_of::<DPTR>(); | ^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unused variable: `digits`: src/disktree/tree.rs#L113
warning: unused variable: `digits` --> src/disktree/tree.rs:113:39 | 113 | fn _get<V>(&mut self, cell: Cell, digits: Digits) -> DiskTreeResult<Option<(Cell, V)>> | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_digits`
unused variable: `cell`: src/disktree/tree.rs#L113
warning: unused variable: `cell` --> src/disktree/tree.rs:113:27 | 113 | fn _get<V>(&mut self, cell: Cell, digits: Digits) -> DiskTreeResult<Option<(Cell, V)>> | ^^^^ help: if this is intentional, prefix it with an underscore: `_cell`
unused variable: `node`: src/disktree/tree.rs#L58
warning: unused variable: `node` --> src/disktree/tree.rs:58:22 | 58 | fn write_node<W>(node: &Node<V>, wtr: &mut W) -> DiskTreeResult<u64> | ^^^^ help: if this is intentional, prefix it with an underscore: `_node` | = note: `#[warn(unused_variables)]` on by default
build
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/