[INFO] cloning repository https://github.com/csdjwt/csd_jwt [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/csdjwt/csd_jwt" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcsdjwt%2Fcsd_jwt", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcsdjwt%2Fcsd_jwt'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] e08aa311e4f0fa1824b950e3b464c20d0d4a80c4 [INFO] linting csdjwt/csd_jwt against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fcsdjwt%2Fcsd_jwt" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/csdjwt/csd_jwt [INFO] finished tweaking git repo https://github.com/csdjwt/csd_jwt [INFO] tweaked toml for git repo https://github.com/csdjwt/csd_jwt written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/csdjwt/csd_jwt on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/csdjwt/csd_jwt already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded data-encoding-macro-internal v0.1.16 [INFO] [stderr] Downloaded secret_sharing_and_dkg v0.13.0 [INFO] [stderr] Downloaded serde_with v1.14.0 [INFO] [stderr] Downloaded schnorr_pok v0.20.0 [INFO] [stderr] Downloaded data-encoding-macro v0.1.18 [INFO] [stderr] Downloaded oblivious_transfer_protocols v0.9.0 [INFO] [stderr] Downloaded rs_merkle v1.5.0 [INFO] [stderr] Downloaded kvac v0.5.0 [INFO] [stderr] Downloaded dock_merlin v3.0.0 [INFO] [stderr] Downloaded dock_crypto_utils v0.20.0 [INFO] [stderr] Downloaded openssl-sys v0.9.108 [INFO] [stderr] Downloaded vb_accumulator v0.26.0 [INFO] [stderr] Downloaded bls12_381_plus v0.8.18 [INFO] [stderr] Downloaded pairing v0.23.0 [INFO] [stderr] Downloaded short_group_sig v0.4.0 [INFO] [stderr] Downloaded josekit v0.8.7 [INFO] [stderr] Downloaded zkryptium v0.5.0 [INFO] [stderr] Downloaded ff v0.13.1 [INFO] [stderr] Downloaded openssl v0.10.72 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] f1c8099a6bece03ce495e84eb83c4b6f3815692ad9778f5f59dcd5c0a5e882b1 [INFO] running `Command { std: "docker" "start" "-a" "f1c8099a6bece03ce495e84eb83c4b6f3815692ad9778f5f59dcd5c0a5e882b1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "f1c8099a6bece03ce495e84eb83c4b6f3815692ad9778f5f59dcd5c0a5e882b1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f1c8099a6bece03ce495e84eb83c4b6f3815692ad9778f5f59dcd5c0a5e882b1", kill_on_drop: false }` [INFO] [stdout] f1c8099a6bece03ce495e84eb83c4b6f3815692ad9778f5f59dcd5c0a5e882b1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 5c3c99abd797606b1f1defc78fdb3f299f221b7eb47929573d5e4c6149b30005 [INFO] running `Command { std: "docker" "start" "-a" "5c3c99abd797606b1f1defc78fdb3f299f221b7eb47929573d5e4c6149b30005", kill_on_drop: false }` [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling zerocopy v0.8.25 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Compiling cc v1.2.23 [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Compiling getrandom v0.3.3 [INFO] [stderr] Checking hashbrown v0.15.3 [INFO] [stderr] Checking bitvec v1.0.1 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Compiling data-encoding v2.9.0 [INFO] [stderr] Compiling thiserror v2.0.16 [INFO] [stderr] Compiling openssl v0.10.72 [INFO] [stderr] Checking base16ct v0.2.0 [INFO] [stderr] Checking adler2 v2.0.0 [INFO] [stderr] Checking miniz_oxide v0.8.8 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking deranged v0.4.0 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking crc32fast v1.4.2 [INFO] [stderr] Checking bitflags v2.9.1 [INFO] [stderr] Checking time-core v0.1.4 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking csv-core v0.1.12 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Checking base-x v0.2.11 [INFO] [stderr] Checking flate2 v1.1.1 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Compiling openssl-sys v0.9.108 [INFO] [stderr] Compiling oblivious_transfer_protocols v0.9.0 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking num-iter v0.1.45 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking num v0.4.3 [INFO] [stderr] Checking ff v0.13.1 [INFO] [stderr] Checking group v0.13.0 [INFO] [stderr] Checking pairing v0.23.0 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking hashbrown v0.13.2 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking ark-std v0.4.0 [INFO] [stderr] Compiling darling_core v0.13.4 [INFO] [stderr] Compiling zeroize_derive v1.4.2 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling thiserror-impl v2.0.16 [INFO] [stderr] Compiling data-encoding-macro-internal v0.1.16 [INFO] [stderr] Compiling ark-serialize-derive v0.4.2 [INFO] [stderr] Compiling ark-ff-macros v0.4.2 [INFO] [stderr] Compiling ark-ff-asm v0.4.2 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Checking data-encoding-macro v0.1.18 [INFO] [stderr] Checking multibase v0.9.1 [INFO] [stderr] Checking zeroize v1.8.1 [INFO] [stderr] Checking generic-array v0.14.7 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking inout v0.1.4 [INFO] [stderr] Checking crypto-bigint v0.5.5 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking aead v0.5.2 [INFO] [stderr] Checking cipher v0.4.4 [INFO] [stderr] Checking digest v0.10.7 [INFO] [stderr] Checking ark-serialize v0.4.2 [INFO] [stderr] Checking sha2 v0.10.9 [INFO] [stderr] Checking hmac v0.12.1 [INFO] [stderr] Checking sha3 v0.10.8 [INFO] [stderr] Checking aes v0.8.4 [INFO] [stderr] Checking hkdf v0.12.4 [INFO] [stderr] Checking rs_merkle v1.5.0 [INFO] [stderr] Checking ark-ff v0.4.2 [INFO] [stderr] Compiling darling_macro v0.13.4 [INFO] [stderr] Compiling darling v0.13.4 [INFO] [stderr] Compiling serde_with_macros v1.5.2 [INFO] [stderr] Checking elliptic-curve v0.13.8 [INFO] [stderr] Checking serde v1.0.219 [INFO] [stderr] Checking serde_with v1.14.0 [INFO] [stderr] Checking dock_merlin v3.0.0 [INFO] [stderr] Checking bls12_381_plus v0.8.18 [INFO] [stderr] Checking csv v1.3.1 [INFO] [stderr] Checking josekit v0.8.7 [INFO] [stderr] Checking zkryptium v0.5.0 [INFO] [stderr] Checking ark-poly v0.4.2 [INFO] [stderr] Checking ark-ec v0.4.2 [INFO] [stderr] Checking dock_crypto_utils v0.20.0 [INFO] [stderr] Checking ark-bn254 v0.4.0 [INFO] [stderr] Checking schnorr_pok v0.20.0 [INFO] [stderr] Checking kvac v0.5.0 [INFO] [stderr] Checking secret_sharing_and_dkg v0.13.0 [INFO] [stderr] Checking short_group_sig v0.4.0 [INFO] [stderr] Checking vb_accumulator v0.26.0 [INFO] [stderr] Checking csd_jwt v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:62:25 [INFO] [stdout] | [INFO] [stdout] 62 | Ok(()) => { () } [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded unit expression [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:62:25 [INFO] [stdout] | [INFO] [stdout] 62 | Ok(()) => { () } [INFO] [stdout] | ^^ help: remove the final `()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stdout] = note: `#[warn(clippy::unused_unit)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/adapters/adapter.rs:50:62 [INFO] [stdout] | [INFO] [stdout] 50 | fn issue_vp(&self, vc: &Map, disclosures: &Vec) -> Result<(Map, String), String>; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `&[String]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/adapters/adapter.rs:60:33 [INFO] [stdout] | [INFO] [stdout] 60 | fn verify_vp(&self, vp_jwt: &String) -> Result<(), String>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:34:38 [INFO] [stdout] | [INFO] [stdout] 34 | fn hash_from_value_and_salt(key: &String, value: &String, salt: &String) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 34 ~ fn hash_from_value_and_salt(key: &str, value: &String, salt: &String) -> String { [INFO] [stdout] 35 | let mut hasher = Sha256::new(); [INFO] [stdout] 36 ~ let mut hasher_input = key.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:34:54 [INFO] [stdout] | [INFO] [stdout] 34 | fn hash_from_value_and_salt(key: &String, value: &String, salt: &String) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 34 ~ fn hash_from_value_and_salt(key: &String, value: &str, salt: &String) -> String { [INFO] [stdout] 35 | let mut hasher = Sha256::new(); [INFO] [stdout] 36 | let mut hasher_input = key.clone(); [INFO] [stdout] 37 | [INFO] [stdout] 38 ~ hasher_input.push_str(value); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:34:69 [INFO] [stdout] | [INFO] [stdout] 34 | fn hash_from_value_and_salt(key: &String, value: &String, salt: &String) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 34 ~ fn hash_from_value_and_salt(key: &String, value: &String, salt: &str) -> String { [INFO] [stdout] 35 | let mut hasher = Sha256::new(); [INFO] [stdout] ... [INFO] [stdout] 38 | hasher_input.push_str(value.as_str()); [INFO] [stdout] 39 ~ hasher_input.push_str(salt); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 42 | let encoded_result = multibase::Base::Base64Url.encode(hasher.finalize()); [INFO] [stdout] | -------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 43 | encoded_result [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ multibase::Base::Base64Url.encode(hasher.finalize()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:73:55 [INFO] [stdout] | [INFO] [stdout] 73 | let hashes: Vec = decode_hashes_value(&hashes_value)?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `hashes_value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `array.get(0)` [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:78:34 [INFO] [stdout] | [INFO] [stdout] 78 | let salt = match array.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `array.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/adapters/adapter.rs:50:62 [INFO] [stdout] | [INFO] [stdout] 50 | fn issue_vp(&self, vc: &Map, disclosures: &Vec) -> Result<(Map, String), String>; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `&[String]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:179:59 [INFO] [stdout] | [INFO] [stdout] 179 | pub fn issue_vp(vc: &Map, disclosures: &Vec, holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, disclosures: &Vec, holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, String), String> { [INFO] [stdout] 179 + pub fn issue_vp(vc: &Map, disclosures: &[String], holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, String), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/adapters/adapter.rs:60:33 [INFO] [stdout] | [INFO] [stdout] 60 | fn verify_vp(&self, vp_jwt: &String) -> Result<(), String>; [INFO] [stdout] | ^^^^^^^ help: change this to: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::get_and_decode` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:183:77 [INFO] [stdout] | [INFO] [stdout] 183 | let salt_value_container: Map = Self::get_and_decode(&mut vp, SVC.to_string())?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 183 - let salt_value_container: Map = Self::get_and_decode(&mut vp, SVC.to_string())?; [INFO] [stdout] 183 + let salt_value_container: Map = Self::get_and_decode(&vp, SVC.to_string())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:194:53 [INFO] [stdout] | [INFO] [stdout] 194 | let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 194 - let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] 194 + let jwt: String = Self::encode_and_sign_jwt(&vp, holder_private_key)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:141:61 [INFO] [stdout] | [INFO] [stdout] 141 | let merkle_tree = MerkleTree::::from_leaves(&leaves); [INFO] [stdout] | ^^^^^^^ help: change this to: `leaves` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:34:38 [INFO] [stdout] | [INFO] [stdout] 34 | fn hash_from_value_and_salt(key: &String, value: &String, salt: &String) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 34 ~ fn hash_from_value_and_salt(key: &str, value: &String, salt: &String) -> String { [INFO] [stdout] 35 | let mut hasher = Sha256::new(); [INFO] [stdout] 36 ~ let mut hasher_input = key.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:34:54 [INFO] [stdout] | [INFO] [stdout] 34 | fn hash_from_value_and_salt(key: &String, value: &String, salt: &String) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 34 ~ fn hash_from_value_and_salt(key: &String, value: &str, salt: &String) -> String { [INFO] [stdout] 35 | let mut hasher = Sha256::new(); [INFO] [stdout] 36 | let mut hasher_input = key.clone(); [INFO] [stdout] 37 | [INFO] [stdout] 38 ~ hasher_input.push_str(value); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:34:69 [INFO] [stdout] | [INFO] [stdout] 34 | fn hash_from_value_and_salt(key: &String, value: &String, salt: &String) -> String { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 34 ~ fn hash_from_value_and_salt(key: &String, value: &String, salt: &str) -> String { [INFO] [stdout] 35 | let mut hasher = Sha256::new(); [INFO] [stdout] ... [INFO] [stdout] 38 | hasher_input.push_str(value.as_str()); [INFO] [stdout] 39 ~ hasher_input.push_str(salt); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:43:9 [INFO] [stdout] | [INFO] [stdout] 42 | let encoded_result = multibase::Base::Base64Url.encode(hasher.finalize()); [INFO] [stdout] | -------------------------------------------------------------------------- unnecessary `let` binding [INFO] [stdout] 43 | encoded_result [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 42 ~ [INFO] [stdout] 43 ~ multibase::Base::Base64Url.encode(hasher.finalize()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:202:37 [INFO] [stdout] | [INFO] [stdout] 202 | Self::verify_root_signature(&vc, issuer_public_key)?; [INFO] [stdout] | ^^^ help: change this to: `vc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:233:45 [INFO] [stdout] | [INFO] [stdout] 233 | let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 233 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 233 + let jwt = Self::encode_and_sign_jwt(&vp, &holder_private_key)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:73:55 [INFO] [stdout] | [INFO] [stdout] 73 | let hashes: Vec = decode_hashes_value(&hashes_value)?; [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `hashes_value` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `array.get(0)` [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:78:34 [INFO] [stdout] | [INFO] [stdout] 78 | let salt = match array.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `array.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:250:46 [INFO] [stdout] | [INFO] [stdout] 250 | let vp = Self::decode_and_verify_jwt(&jwt, &holder_public_key)?; [INFO] [stdout] | ^^^^ help: change this to: `jwt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:262:73 [INFO] [stdout] | [INFO] [stdout] 262 | let disclosed_leaves = Self::convert_claims_and_salts_to_leaves(&disclosed_claims, &disclosed_salts)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `disclosed_claims` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:262:92 [INFO] [stdout] | [INFO] [stdout] 262 | let disclosed_leaves = Self::convert_claims_and_salts_to_leaves(&disclosed_claims, &disclosed_salts)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `disclosed_salts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:179:59 [INFO] [stdout] | [INFO] [stdout] 179 | pub fn issue_vp(vc: &Map, disclosures: &Vec, holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, disclosures: &Vec, holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, String), String> { [INFO] [stdout] 179 + pub fn issue_vp(vc: &Map, disclosures: &[String], holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, String), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:270:34 [INFO] [stdout] | [INFO] [stdout] 270 | merkle_root[i] = byte.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*byte` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::get_and_decode` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:183:77 [INFO] [stdout] | [INFO] [stdout] 183 | let salt_value_container: Map = Self::get_and_decode(&mut vp, SVC.to_string())?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 183 - let salt_value_container: Map = Self::get_and_decode(&mut vp, SVC.to_string())?; [INFO] [stdout] 183 + let salt_value_container: Map = Self::get_and_decode(&vp, SVC.to_string())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:194:53 [INFO] [stdout] | [INFO] [stdout] 194 | let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 194 - let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] 194 + let jwt: String = Self::encode_and_sign_jwt(&vp, holder_private_key)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `MerkleTreeInstance::issue_vc` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:308:61 [INFO] [stdout] | [INFO] [stdout] 308 | let (vc, _jwt) = match MerkleTreeInstance::issue_vc(&mut raw_vc, &issuer_private_key) { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 308 - let (vc, _jwt) = match MerkleTreeInstance::issue_vc(&mut raw_vc, &issuer_private_key) { [INFO] [stdout] 308 + let (vc, _jwt) = match MerkleTreeInstance::issue_vc(&raw_vc, &issuer_private_key) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/hash_sd_algorithm.rs:56:38 [INFO] [stdout] | [INFO] [stdout] 56 | match verifier.verify(bytes, &signature) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `signature` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/sd_algorithms/hashes/hash_sd_algorithm.rs:58:71 [INFO] [stdout] | [INFO] [stdout] 58 | Err(err) => { Err(format!("Error in verification: {}", err.to_string())) } [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/sd_algorithm.rs:29:43 [INFO] [stdout] | [INFO] [stdout] 29 | Value::Object(claims) => { Ok(&claims) } [INFO] [stdout] | ^^^^^^^ help: change this to: `claims` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:141:61 [INFO] [stdout] | [INFO] [stdout] 141 | let merkle_tree = MerkleTree::::from_leaves(&leaves); [INFO] [stdout] | ^^^^^^^ help: change this to: `leaves` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/sd_algorithms/sd_algorithm.rs:172:62 [INFO] [stdout] | [INFO] [stdout] 172 | let (payload, _header) = match jwt::decode_unsecured(&jwt) { [INFO] [stdout] | ^^^^ help: change this to: `jwt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:202:37 [INFO] [stdout] | [INFO] [stdout] 202 | Self::verify_root_signature(&vc, issuer_public_key)?; [INFO] [stdout] | ^^^ help: change this to: `vc` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/sd_algorithms/sd_algorithm.rs:222:66 [INFO] [stdout] | [INFO] [stdout] 222 | let (payload, _header) = match jwt::decode_with_verifier(&jwt, &verifier) { [INFO] [stdout] | ^^^^ help: change this to: `jwt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:233:45 [INFO] [stdout] | [INFO] [stdout] 233 | let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 233 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 233 + let jwt = Self::encode_and_sign_jwt(&vp, &holder_private_key)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:250:46 [INFO] [stdout] | [INFO] [stdout] 250 | let vp = Self::decode_and_verify_jwt(&jwt, &holder_public_key)?; [INFO] [stdout] | ^^^^ help: change this to: `jwt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:262:73 [INFO] [stdout] | [INFO] [stdout] 262 | let disclosed_leaves = Self::convert_claims_and_salts_to_leaves(&disclosed_claims, &disclosed_salts)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: change this to: `disclosed_claims` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:262:92 [INFO] [stdout] | [INFO] [stdout] 262 | let disclosed_leaves = Self::convert_claims_and_salts_to_leaves(&disclosed_claims, &disclosed_salts)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `disclosed_salts` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u8` which implements the `Copy` trait [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:270:34 [INFO] [stdout] | [INFO] [stdout] 270 | merkle_root[i] = byte.clone(); [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*byte` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/hash_sd_algorithm.rs:56:38 [INFO] [stdout] | [INFO] [stdout] 56 | match verifier.verify(bytes, &signature) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `signature` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/sd_algorithms/hashes/hash_sd_algorithm.rs:58:71 [INFO] [stdout] | [INFO] [stdout] 58 | Err(err) => { Err(format!("Error in verification: {}", err.to_string())) } [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:102:41 [INFO] [stdout] | [INFO] [stdout] 102 | pub fn convert_claim_to_scalar(key: &String, value: &Value) -> Fr { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 102 ~ pub fn convert_claim_to_scalar(key: &str, value: &Value) -> Fr { [INFO] [stdout] 103 | [INFO] [stdout] 104 | let mut hasher = Sha256::new(); [INFO] [stdout] 105 ~ let mut hash_input = key.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:107:29 [INFO] [stdout] | [INFO] [stdout] 107 | hash_input.push_str(&*value.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&value.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:112:37 [INFO] [stdout] | [INFO] [stdout] 112 | Fr::from_be_bytes_mod_order(&result.as_slice()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `result.as_slice()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/sd_algorithm.rs:29:43 [INFO] [stdout] | [INFO] [stdout] 29 | Value::Object(claims) => { Ok(&claims) } [INFO] [stdout] | ^^^^^^^ help: change this to: `claims` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `array.get(0)` [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:137:47 [INFO] [stdout] | [INFO] [stdout] 137 | let witness_value = match array.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `array.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/sd_algorithms/sd_algorithm.rs:172:62 [INFO] [stdout] | [INFO] [stdout] 172 | let (payload, _header) = match jwt::decode_unsecured(&jwt) { [INFO] [stdout] | ^^^^ help: change this to: `jwt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/sd_algorithms/sd_algorithm.rs:222:66 [INFO] [stdout] | [INFO] [stdout] 222 | let (payload, _header) = match jwt::decode_with_verifier(&jwt, &verifier) { [INFO] [stdout] | ^^^^ help: change this to: `jwt` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:250:59 [INFO] [stdout] | [INFO] [stdout] 250 | pub fn issue_vp(vc: &Map, disclosures: &Vec, holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, disclosures: &Vec, holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, String), String> { [INFO] [stdout] 250 + pub fn issue_vp(vc: &Map, disclosures: &[String], holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, String), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::get_and_decode` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:254:80 [INFO] [stdout] | [INFO] [stdout] 254 | let witness_value_container: Map = Self::get_and_decode(&mut vp, WVC.to_string())?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 254 - let witness_value_container: Map = Self::get_and_decode(&mut vp, WVC.to_string())?; [INFO] [stdout] 254 + let witness_value_container: Map = Self::get_and_decode(&vp, WVC.to_string())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:264:53 [INFO] [stdout] | [INFO] [stdout] 264 | let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 264 - let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] 264 + let jwt: String = Self::encode_and_sign_jwt(&vp, holder_private_key)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InMemoryState` [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:302:5 [INFO] [stdout] | [INFO] [stdout] 302 | / pub fn new() -> Self { [INFO] [stdout] 303 | | let db = HashSet::::new(); [INFO] [stdout] 304 | | Self { db } [INFO] [stdout] 305 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 301 + impl Default for InMemoryState { [INFO] [stdout] 302 + fn default() -> Self { [INFO] [stdout] 303 + Self::new() [INFO] [stdout] 304 + } [INFO] [stdout] 305 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(element).is_some()` [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:318:17 [INFO] [stdout] | [INFO] [stdout] 318 | self.db.get(element).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains(element)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:362:68 [INFO] [stdout] | [INFO] [stdout] 362 | let (vc, _vc_jwt) = match CsdJwtInstance::issue_vc(raw_vc, &issuer_private_key, ¶ms) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `issuer_private_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:367:46 [INFO] [stdout] | [INFO] [stdout] 367 | match CsdJwtInstance::verify_vc(&vc, &issuer_public_key, ¶ms) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `issuer_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:102:41 [INFO] [stdout] | [INFO] [stdout] 102 | pub fn convert_claim_to_scalar(key: &String, value: &Value) -> Fr { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 102 ~ pub fn convert_claim_to_scalar(key: &str, value: &Value) -> Fr { [INFO] [stdout] 103 | [INFO] [stdout] 104 | let mut hasher = Sha256::new(); [INFO] [stdout] 105 ~ let mut hash_input = key.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:107:29 [INFO] [stdout] | [INFO] [stdout] 107 | hash_input.push_str(&*value.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `&value.to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:112:37 [INFO] [stdout] | [INFO] [stdout] 112 | Fr::from_be_bytes_mod_order(&result.as_slice()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `result.as_slice()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `array.get(0)` [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:137:47 [INFO] [stdout] | [INFO] [stdout] 137 | let witness_value = match array.get(0) { [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `array.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:379:50 [INFO] [stdout] | [INFO] [stdout] 379 | match CsdJwtInstance::verify_vp(&vp_jwt, &issuer_public_key, &holder_public_key, ¶ms) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `issuer_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:51:86 [INFO] [stdout] | [INFO] [stdout] 51 | Err(err) => { return Err(format!("Error in producing signature [{}]", err.to_string()).to_string()) } [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::extract_claims` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:96:43 [INFO] [stdout] | [INFO] [stdout] 96 | let claims = Self::extract_claims(&mut vp)?.clone(); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 96 - let claims = Self::extract_claims(&mut vp)?.clone(); [INFO] [stdout] 96 + let claims = Self::extract_claims(&vp)?.clone(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::get_and_decode` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:100:80 [INFO] [stdout] | [INFO] [stdout] 100 | let bbs_signature: Signature = Self::get_and_decode(&mut vp, SIGNATURE.to_string())?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 100 - let bbs_signature: Signature = Self::get_and_decode(&mut vp, SIGNATURE.to_string())?; [INFO] [stdout] 100 + let bbs_signature: Signature = Self::get_and_decode(&vp, SIGNATURE.to_string())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | &issuer_public_key, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `issuer_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:250:59 [INFO] [stdout] | [INFO] [stdout] 250 | pub fn issue_vp(vc: &Map, disclosures: &Vec, holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, disclosures: &Vec, holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, String), String> { [INFO] [stdout] 250 + pub fn issue_vp(vc: &Map, disclosures: &[String], holder_private_key: &impl AsRef<[u8]>) -> Result<(Map, String), String> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::get_and_decode` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:254:80 [INFO] [stdout] | [INFO] [stdout] 254 | let witness_value_container: Map = Self::get_and_decode(&mut vp, WVC.to_string())?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 254 - let witness_value_container: Map = Self::get_and_decode(&mut vp, WVC.to_string())?; [INFO] [stdout] 254 + let witness_value_container: Map = Self::get_and_decode(&vp, WVC.to_string())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:119:45 [INFO] [stdout] | [INFO] [stdout] 119 | let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 119 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 119 + let jwt = Self::encode_and_sign_jwt(&vp, &holder_private_key)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:264:53 [INFO] [stdout] | [INFO] [stdout] 264 | let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 264 - let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] 264 + let jwt: String = Self::encode_and_sign_jwt(&vp, holder_private_key)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | &issuer_public_key, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `issuer_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `InMemoryState` [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:302:5 [INFO] [stdout] | [INFO] [stdout] 302 | / pub fn new() -> Self { [INFO] [stdout] 303 | | let db = HashSet::::new(); [INFO] [stdout] 304 | | Self { db } [INFO] [stdout] 305 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 301 + impl Default for InMemoryState { [INFO] [stdout] 302 + fn default() -> Self { [INFO] [stdout] 303 + Self::new() [INFO] [stdout] 304 + } [INFO] [stdout] 305 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(element).is_some()` [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:318:17 [INFO] [stdout] | [INFO] [stdout] 318 | self.db.get(element).is_some() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `contains(element)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:199:69 [INFO] [stdout] | [INFO] [stdout] 199 | let (vc, _vc_jwt) = match BBSPlusInstance::issue_vc(raw_vc, &issuer_pk, &issuer_sk) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `issuer_pk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:199:81 [INFO] [stdout] | [INFO] [stdout] 199 | let (vc, _vc_jwt) = match BBSPlusInstance::issue_vc(raw_vc, &issuer_pk, &issuer_sk) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `issuer_sk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `to_string` applied to a type that implements `Display` in `format!` args [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:51:86 [INFO] [stdout] | [INFO] [stdout] 51 | Err(err) => { return Err(format!("Error in producing signature [{}]", err.to_string()).to_string()) } [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:204:47 [INFO] [stdout] | [INFO] [stdout] 204 | match BBSPlusInstance::verify_vc(&vc, &issuer_pk) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `issuer_pk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:211:80 [INFO] [stdout] | [INFO] [stdout] 211 | let (_vp, vp_jwt) = match BBSPlusInstance::issue_vp(&vc, &disclosures, &issuer_pk, &holder_private_key) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `issuer_pk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:216:51 [INFO] [stdout] | [INFO] [stdout] 216 | match BBSPlusInstance::verify_vp(&vp_jwt, &issuer_pk, &holder_public_key) { [INFO] [stdout] | ^^^^^^^^^^ help: change this to: `issuer_pk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::extract_claims` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:96:43 [INFO] [stdout] | [INFO] [stdout] 96 | let claims = Self::extract_claims(&mut vp)?.clone(); [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 96 - let claims = Self::extract_claims(&mut vp)?.clone(); [INFO] [stdout] 96 + let claims = Self::extract_claims(&vp)?.clone(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::get_and_decode` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:100:80 [INFO] [stdout] | [INFO] [stdout] 100 | let bbs_signature: Signature = Self::get_and_decode(&mut vp, SIGNATURE.to_string())?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 100 - let bbs_signature: Signature = Self::get_and_decode(&mut vp, SIGNATURE.to_string())?; [INFO] [stdout] 100 + let bbs_signature: Signature = Self::get_and_decode(&vp, SIGNATURE.to_string())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/signatures/signature_sd_algorithm.rs:10:49 [INFO] [stdout] | [INFO] [stdout] 10 | fn complementary_indices(disclosed_indices: &Vec, len: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 10 - fn complementary_indices(disclosed_indices: &Vec, len: usize) -> Vec { [INFO] [stdout] 10 + fn complementary_indices(disclosed_indices: &[usize], len: usize) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:104:13 [INFO] [stdout] | [INFO] [stdout] 104 | &issuer_public_key, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `issuer_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:119:45 [INFO] [stdout] | [INFO] [stdout] 119 | let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 119 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 119 + let jwt = Self::encode_and_sign_jwt(&vp, &holder_private_key)?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/csv_writer.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | if !metadata(csv_dir).is_ok() { // directory does not exist [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `metadata(csv_dir).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:146:13 [INFO] [stdout] | [INFO] [stdout] 146 | &issuer_public_key, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: change this to: `issuer_public_key` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/signatures/signature_sd_algorithm.rs:10:49 [INFO] [stdout] | [INFO] [stdout] 10 | fn complementary_indices(disclosed_indices: &Vec, len: usize) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 10 - fn complementary_indices(disclosed_indices: &Vec, len: usize) -> Vec { [INFO] [stdout] 10 + fn complementary_indices(disclosed_indices: &[usize], len: usize) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/csv_writer.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 46 | if !metadata(csv_dir).is_ok() { // directory does not exist [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `metadata(csv_dir).is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/benchmark.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | total = total + start.elapsed().as_secs_f64(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total += start.elapsed().as_secs_f64()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/display.rs:22:31 [INFO] [stdout] | [INFO] [stdout] 22 | fn display(sd_algorithms: &Vec>, raw_vc: &Map, disclosures: &Vec, iterations: i8) -> Res... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Box]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/display.rs:22:97 [INFO] [stdout] | [INFO] [stdout] 22 | ...aw_vc: &Map, disclosures: &Vec, iterations: i8) -> Result<(), String>; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `&[String]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/display.rs:36:54 [INFO] [stdout] | [INFO] [stdout] 36 | let (vp, vp_jwt) = adapter.issue_vp(&vc, &disclosures)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `disclosures` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/benchmark.rs:39:13 [INFO] [stdout] | [INFO] [stdout] 39 | total = total + start.elapsed().as_secs_f64(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `total += start.elapsed().as_secs_f64()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/display.rs:22:31 [INFO] [stdout] | [INFO] [stdout] 22 | fn display(sd_algorithms: &Vec>, raw_vc: &Map, disclosures: &Vec, iterations: i8) -> Res... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[Box]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/display.rs:22:97 [INFO] [stdout] | [INFO] [stdout] 22 | ...aw_vc: &Map, disclosures: &Vec, iterations: i8) -> Result<(), String>; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `&[String]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/display.rs:68:99 [INFO] [stdout] | [INFO] [stdout] 68 | let (elapsed, (_vp, vp_jwt)) = Benchmark::benchmark_function(|| adapter.issue_vp(&vc, &disclosures), iterations)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `disclosures` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/display.rs:36:54 [INFO] [stdout] | [INFO] [stdout] 36 | let (vp, vp_jwt) = adapter.issue_vp(&vc, &disclosures)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `disclosures` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/sd_algorithms/hashes/sd_jwt.rs:258:27 [INFO] [stdout] | [INFO] [stdout] 258 | let disclosures = vec!["name", "birthdate"].iter().map(|x| x.to_string()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["name", "birthdate"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:318:27 [INFO] [stdout] | [INFO] [stdout] 318 | let disclosures = vec!["name", "birthdate"].iter().map(|x| x.to_string()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["name", "birthdate"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/sd_algorithms/accumulators/csd_jwt.rs:372:27 [INFO] [stdout] | [INFO] [stdout] 372 | let disclosures = vec!["name", "birthdate"].iter().map(|x| x.to_string()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["name", "birthdate"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/sd_algorithms/signatures/bbs_plus.rs:209:27 [INFO] [stdout] | [INFO] [stdout] 209 | let disclosures = vec!["name", "birthdate"].iter().map(|x| x.to_string()).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `["name", "birthdate"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/display.rs:68:99 [INFO] [stdout] | [INFO] [stdout] 68 | let (elapsed, (_vp, vp_jwt)) = Benchmark::benchmark_function(|| adapter.issue_vp(&vc, &disclosures), iterations)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `disclosures` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/main.rs:37:67 [INFO] [stdout] | [INFO] [stdout] 37 | fn initialize_sd_algorithms(claims_len: usize, iterations: i8) -> Result<(Vec, Vec>), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | String::from(format!("Claim Key {}", i)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("Claim Key {}", i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:66:27 [INFO] [stdout] | [INFO] [stdout] 66 | Value::String(String::from(format!("Claim Value {}", i))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("Claim Value {}", i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:178:107 [INFO] [stdout] | [INFO] [stdout] 178 | let (duration, (vp, vp_jwt)) = Benchmark::benchmark_function(|| algo.issue_vp(&clone, &disclosures), iterations)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `disclosures` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/main.rs:37:67 [INFO] [stdout] | [INFO] [stdout] 37 | fn initialize_sd_algorithms(claims_len: usize, iterations: i8) -> Result<(Vec, Vec>), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:65:13 [INFO] [stdout] | [INFO] [stdout] 65 | String::from(format!("Claim Key {}", i)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("Claim Key {}", i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/main.rs:66:27 [INFO] [stdout] | [INFO] [stdout] 66 | Value::String(String::from(format!("Claim Value {}", i))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("Claim Value {}", i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:178:107 [INFO] [stdout] | [INFO] [stdout] 178 | let (duration, (vp, vp_jwt)) = Benchmark::benchmark_function(|| algo.issue_vp(&clone, &disclosures), iterations)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `disclosures` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 51.18s [INFO] running `Command { std: "docker" "inspect" "5c3c99abd797606b1f1defc78fdb3f299f221b7eb47929573d5e4c6149b30005", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5c3c99abd797606b1f1defc78fdb3f299f221b7eb47929573d5e4c6149b30005", kill_on_drop: false }` [INFO] [stdout] 5c3c99abd797606b1f1defc78fdb3f299f221b7eb47929573d5e4c6149b30005