Skip to content

Code style fixes

Code style fixes #231

Triggered via push October 26, 2023 14:27
Status Failure
Total duration 1m 12s
Artifacts
check_and_test
1m 3s
check_and_test
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 19 warnings
struct takes 1 generic argument but 2 generic arguments were supplied: libzeropool-rs-wasm/src/client/mod.rs#L63
error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied --> libzeropool-rs-wasm/src/client/mod.rs:63:23 | 63 | inner: Rc<RefCell<NativeUserAccount<Database, PoolParams>>>, | ^^^^^^^^^^^^^^^^^ ---------- help: remove this generic argument | | | expected 1 generic argument | note: struct defined here, with 1 generic parameter: `P` --> /home/runner/work/libzeropool-rs/libzeropool-rs/libzeropool-rs/src/client/mod.rs:108:12 | 108 | pub struct UserAccount<P: PoolParams> { | ^^^^^^^^^^^ -
check_and_test
Clippy had exited with the 101 exit code
ambiguous glob re-exports: libzeropool-rs-wasm/src/lib.rs#L21
warning: ambiguous glob re-exports --> libzeropool-rs-wasm/src/lib.rs:21:9 | 21 | pub use crate::{ | _________^ 22 | | client::*, 23 | | proof::*, 24 | | state::{Transaction, UserState}, 25 | | ts_types::*, | | ----------- but the name `Proof` in the type namespace is also re-exported here 26 | | }; | |_^ the name `Proof` in the type namespace is first re-exported here | = note: `#[warn(ambiguous_glob_reexports)]` on by default
deref which would be done by auto-deref: libs/kvdb-web/src/lib.rs#L112
warning: deref which would be done by auto-deref --> libs/kvdb-web/src/lib.rs:112:52 | 112 | let _ = indexed_db::idb_commit_transaction(&*self.indexed_db, &transaction, self.columns); | ^^^^^^^^^^^^^^^^^ help: try: `&self.indexed_db` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
non-binding `let` on a future: libs/kvdb-web/src/lib.rs#L112
warning: non-binding `let` on a future --> libs/kvdb-web/src/lib.rs:112:9 | 112 | let _ = indexed_db::idb_commit_transaction(&*self.indexed_db, &transaction, self.columns); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: consider awaiting the future or dropping explicitly with `std::mem::drop` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future = note: `#[warn(clippy::let_underscore_future)]` on by default
deref which would be done by auto-deref: libs/kvdb-web/src/lib.rs#L67
warning: deref which would be done by auto-deref --> libs/kvdb-web/src/lib.rs:67:53 | 67 | let mut stream = indexed_db::idb_cursor(&*inner, column); | ^^^^^^^ help: try: `&inner` | = 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
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: libzeropool-rs/src/utils.rs#L17
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> libzeropool-rs/src/utils.rs:17:14 | 17 | .zip(hasher.finalize().into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `hasher.finalize()` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/iter/traits/iterator.rs:642:12 = 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
this expression creates a reference which is immediately dereferenced by the compiler: libzeropool-rs/src/merkle.rs#L347
warning: this expression creates a reference which is immediately dereferenced by the compiler --> libzeropool-rs/src/merkle.rs:347:13 | 347 | &update_boundaries, | ^^^^^^^^^^^^^^^^^^ help: change this to: `update_boundaries` | = 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 lifetime isn't used in the impl: libzeropool-rs/src/client/mod.rs#L115
warning: this lifetime isn't used in the impl --> libzeropool-rs/src/client/mod.rs:115:6 | 115 | impl<'p, P> UserAccount<P> | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
unused imports: `State`, `Transaction`: libzeropool-rs/src/client/mod.rs#L27
warning: unused imports: `State`, `Transaction` --> libzeropool-rs/src/client/mod.rs:27:19 | 27 | use self::state::{State, Transaction}; | ^^^^^ ^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
question mark operator is useless here: libs/kvdb-persy/src/lib.rs#L200
warning: question mark operator is useless here --> libs/kvdb-persy/src/lib.rs:200:29 | 200 | / ... Ok(tx 201 | | ... .one::<PersyId, String>(&index_id_to_k, rec_id) 202 | | ... .map_err(persy_to_io)? 203 | | ... .ok_or_else(|| { 204 | | ... std::io::Error::new(std::io::ErrorKind::Other, "Key not found") 205 | | ... })?) | |______________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark = note: `#[warn(clippy::needless_question_mark)]` on by default help: try removing question mark and `Ok()` | 200 ~ tx 201 + .one::<PersyId, String>(&index_id_to_k, rec_id) 202 + .map_err(persy_to_io)? 203 + .ok_or_else(|| { 204 + std::io::Error::new(std::io::ErrorKind::Other, "Key not found") 205 + }) |
the borrowed expression implements the required traits: libs/kvdb-persy/src/lib.rs#L117
warning: the borrowed expression implements the required traits --> libs/kvdb-persy/src/lib.rs:117:22 | 117 | self.db.read(&col.to_string(), &rec_id).map_err(persy_to_io) | ^^^^^^^^^^^^^^^^ help: change this to: `col.to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the borrowed expression implements the required traits: libs/kvdb-persy/src/lib.rs#L100
warning: the borrowed expression implements the required traits --> libs/kvdb-persy/src/lib.rs:100:37 | 100 | let data = self.db.read(&segment, &id).map_err(persy_to_io)?; | ^^^^^^^^ help: change this to: `segment` | = 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
check_and_test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, Swatinem/rust-cache@v1, 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/
check_and_test
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/
check_and_test
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/
check_and_test
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/
check_and_test
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/
check_and_test
The `save-state` 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/
check_and_test
The `save-state` 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/
check_and_test
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/