[INFO] cloning repository https://github.com/alebldn/sd_benchmark [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/alebldn/sd_benchmark" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falebldn%2Fsd_benchmark", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falebldn%2Fsd_benchmark'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8463d6b26c181c661080c71cd3d84d9fb70e29db [INFO] linting alebldn/sd_benchmark against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Falebldn%2Fsd_benchmark" "/workspace/builds/worker-2-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-2-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/alebldn/sd_benchmark [INFO] finished tweaking git repo https://github.com/alebldn/sd_benchmark [INFO] tweaked toml for git repo https://github.com/alebldn/sd_benchmark written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/alebldn/sd_benchmark 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/alebldn/sd_benchmark 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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded rs_merkle v1.5.0 [INFO] [stderr] Downloaded josekit v0.8.7 [INFO] [stderr] Downloaded zkryptium v0.5.0 [INFO] [stderr] Downloaded rug v1.27.0 [INFO] [stderr] Downloaded bls12_381_plus v0.8.18 [INFO] [stderr] Downloaded gmp-mpfr-sys v1.6.5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 14f180be8dfc20bb48695ffd33f5cf1816906aa24d7736bb690c4ceff9f5b73e [INFO] running `Command { std: "docker" "start" "-a" "14f180be8dfc20bb48695ffd33f5cf1816906aa24d7736bb690c4ceff9f5b73e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "14f180be8dfc20bb48695ffd33f5cf1816906aa24d7736bb690c4ceff9f5b73e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "14f180be8dfc20bb48695ffd33f5cf1816906aa24d7736bb690c4ceff9f5b73e", kill_on_drop: false }` [INFO] [stdout] 14f180be8dfc20bb48695ffd33f5cf1816906aa24d7736bb690c4ceff9f5b73e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-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] 9a56bf6794668c6f8f17c50ba7f90039e59548e4801f3c94d39cdb2bf9f5ae41 [INFO] running `Command { std: "docker" "start" "-a" "9a56bf6794668c6f8f17c50ba7f90039e59548e4801f3c94d39cdb2bf9f5ae41", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.101 [INFO] [stderr] Compiling radium v0.7.0 [INFO] [stderr] Checking tap v1.0.1 [INFO] [stderr] Checking subtle v2.6.1 [INFO] [stderr] Checking funty v2.0.0 [INFO] [stderr] Compiling generic-array v0.14.7 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling cc v1.2.23 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling gmp-mpfr-sys v1.6.5 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking either v1.15.0 [INFO] [stderr] Checking ahash v0.8.12 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking hashbrown v0.15.3 [INFO] [stderr] Compiling serde_json v1.0.140 [INFO] [stderr] Checking wyz v0.5.1 [INFO] [stderr] Compiling az v1.2.1 [INFO] [stderr] Checking hashbrown v0.13.2 [INFO] [stderr] Checking itertools v0.10.5 [INFO] [stderr] Compiling openssl v0.10.72 [INFO] [stderr] Compiling data-encoding v2.9.0 [INFO] [stderr] Compiling rug v1.27.0 [INFO] [stderr] Checking rand_core v0.9.3 [INFO] [stderr] Checking base16ct v0.2.0 [INFO] [stderr] Checking deranged v0.4.0 [INFO] [stderr] Checking miniz_oxide v0.8.8 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking indexmap v2.9.0 [INFO] [stderr] Checking rand_chacha v0.9.0 [INFO] [stderr] Checking bitvec v1.0.1 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking time-core v0.1.4 [INFO] [stderr] Checking flate2 v1.1.1 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking csv-core v0.1.12 [INFO] [stderr] Checking base-x v0.2.11 [INFO] [stderr] Checking num-bigint v0.4.6 [INFO] [stderr] Checking rand v0.9.1 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Compiling openssl-sys v0.9.108 [INFO] [stderr] Checking ark-std v0.4.0 [INFO] [stderr] Checking ff v0.13.1 [INFO] [stderr] Checking group v0.13.0 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Checking pairing v0.23.0 [INFO] [stderr] Compiling zeroize_derive v1.4.2 [INFO] [stderr] Compiling serde_derive v1.0.219 [INFO] [stderr] Compiling openssl-macros v0.1.1 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling thiserror-impl v2.0.12 [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 derivative v2.2.0 [INFO] [stderr] Compiling ark-ff-asm v0.4.2 [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 thiserror v2.0.12 [INFO] [stderr] Checking block-buffer v0.10.4 [INFO] [stderr] Checking crypto-common v0.1.6 [INFO] [stderr] Checking crypto-bigint v0.5.5 [INFO] [stderr] Checking thiserror v1.0.69 [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 sha3 v0.10.8 [INFO] [stderr] Checking ark-ff v0.4.2 [INFO] [stderr] Checking rs_merkle v1.5.0 [INFO] [stderr] Checking elliptic-curve v0.13.8 [INFO] [stderr] Checking serde v1.0.219 [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 ark-poly v0.4.2 [INFO] [stderr] Checking ark-ec v0.4.2 [INFO] [stderr] Checking ark-bls12-381 v0.4.0 [INFO] [stderr] Checking zkryptium v0.5.0 [INFO] [stderr] Checking sd_benchmark v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | g: g, [INFO] [stdout] | ^^^^ help: replace it with: `g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | h: h, [INFO] [stdout] | ^^^^ help: replace it with: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:29:13 [INFO] [stdout] | [INFO] [stdout] 29 | g: g, [INFO] [stdout] | ^^^^ help: replace it with: `g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:30:13 [INFO] [stdout] | [INFO] [stdout] 30 | h: h, [INFO] [stdout] | ^^^^ help: replace it with: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::ScalarField` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:18:64 [INFO] [stdout] | [INFO] [stdout] 18 | let commitment = Self::commit_with_randomness(message, randomness.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `randomness` [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: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:26:32 [INFO] [stdout] | [INFO] [stdout] 26 | let c: P::G1Affine = ((g.clone() * message) + (h.clone() * randomness)).into(); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:26:56 [INFO] [stdout] | [INFO] [stdout] 26 | let c: P::G1Affine = ((g.clone() * message) + (h.clone() * randomness)).into(); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:36:36 [INFO] [stdout] | [INFO] [stdout] 36 | let expected_commitment = (self.g.clone() * message) + (self.h.clone() * randomness); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:36:65 [INFO] [stdout] | [INFO] [stdout] 36 | let expected_commitment = (self.g.clone() * message) + (self.h.clone() * randomness); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:44:34 [INFO] [stdout] | [INFO] [stdout] 44 | let u_t: P::G1Affine = ((self.g.clone() * alpha_t) + (self.h.clone() * beta_t)).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:44:63 [INFO] [stdout] | [INFO] [stdout] 44 | let u_t: P::G1Affine = ((self.g.clone() * alpha_t) + (self.h.clone() * beta_t)).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Fp, 4>` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:87:32 [INFO] [stdout] | [INFO] [stdout] 87 | Some(y_i) => { y_i.clone() } [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*y_i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Fp, 4>` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:99:36 [INFO] [stdout] | [INFO] [stdout] 99 | Some(y_j) => { y_j.clone() } [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*y_j` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:124:46 [INFO] [stdout] | [INFO] [stdout] 124 | pub fn sign(sk: &PSPrivateKey, messages: &Vec, rng: &mut StdRng) -> Result { [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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 124 - pub fn sign(sk: &PSPrivateKey, messages: &Vec, rng: &mut StdRng) -> Result { [INFO] [stdout] 124 + pub fn sign(sk: &PSPrivateKey, messages: &[PSMessage], rng: &mut StdRng) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:137:13 [INFO] [stdout] | [INFO] [stdout] 137 | exponent = exponent + y_i.clone() * message.message(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `exponent += y_i.clone() * message.message()` [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: using `clone` on type `Fp, 4>` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:137:35 [INFO] [stdout] | [INFO] [stdout] 137 | exponent = exponent + y_i.clone() * message.message(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*y_i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:162:72 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn derive(pk: &PSPublicKey, signature: &PSSignature, messages: &Vec, disclosed_indices: &Vec, rng: &mut S... [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] 162 - pub fn derive(pk: &PSPublicKey, signature: &PSSignature, messages: &Vec, disclosed_indices: &Vec, rng: &mut StdRng) -> Result { [INFO] [stdout] 162 + pub fn derive(pk: &PSPublicKey, signature: &PSSignature, messages: &[PSMessage], disclosed_indices: &Vec, rng: &mut StdRng) -> Result { [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/our_impl/pointcheval_sanders/ps_signature.rs:163:53 [INFO] [stdout] | [INFO] [stdout] 163 | 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] 163 - fn complementary_indices(disclosed_indices: &Vec, len: usize) -> Vec { [INFO] [stdout] 163 + fn complementary_indices(disclosed_indices: &[usize], len: usize) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(Affine, Affine)` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:189:35 [INFO] [stdout] | [INFO] [stdout] 189 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(Affine, Affine)` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:204:35 [INFO] [stdout] | [INFO] [stdout] 204 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:220:39 [INFO] [stdout] | [INFO] [stdout] 220 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(Affine, Affine)` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:259:39 [INFO] [stdout] | [INFO] [stdout] 259 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(Affine, Affine)` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:276:39 [INFO] [stdout] | [INFO] [stdout] 276 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `des.get(0)` [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:328:34 [INFO] [stdout] | [INFO] [stdout] 328 | let cursor = Cursor::new(des.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `des.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] [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: using `clone` on type `

::ScalarField` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:18:64 [INFO] [stdout] | [INFO] [stdout] 18 | let commitment = Self::commit_with_randomness(message, randomness.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `randomness` [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: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:26:32 [INFO] [stdout] | [INFO] [stdout] 26 | let c: P::G1Affine = ((g.clone() * message) + (h.clone() * randomness)).into(); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:26:56 [INFO] [stdout] | [INFO] [stdout] 26 | let c: P::G1Affine = ((g.clone() * message) + (h.clone() * randomness)).into(); [INFO] [stdout] | ^^^^^^^^^ help: try removing the `clone` call: `h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:36:36 [INFO] [stdout] | [INFO] [stdout] 36 | let expected_commitment = (self.g.clone() * message) + (self.h.clone() * randomness); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:36:65 [INFO] [stdout] | [INFO] [stdout] 36 | let expected_commitment = (self.g.clone() * message) + (self.h.clone() * randomness); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:44:34 [INFO] [stdout] | [INFO] [stdout] 44 | let u_t: P::G1Affine = ((self.g.clone() * alpha_t) + (self.h.clone() * beta_t)).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `

::G1Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:44:63 [INFO] [stdout] | [INFO] [stdout] 44 | let u_t: P::G1Affine = ((self.g.clone() * alpha_t) + (self.h.clone() * beta_t)).into(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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: used `assert_eq!` with a literal bool [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:91:9 [INFO] [stdout] | [INFO] [stdout] 91 | assert_eq!(commitment.verify(message, randomness), false); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison [INFO] [stdout] = note: `#[warn(clippy::bool_assert_comparison)]` on by default [INFO] [stdout] help: replace it with `assert!(..)` [INFO] [stdout] | [INFO] [stdout] 91 - assert_eq!(commitment.verify(message, randomness), false); [INFO] [stdout] 91 + assert!(!commitment.verify(message, randomness)); [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: using `clone` on type `Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:106:91 [INFO] [stdout] | [INFO] [stdout] 106 | ...ha_z, beta_z, u_t, commitment.commitment.clone(), challenge, commitment.g.clone(), commitment.h.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `commitment.commitment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:106:133 [INFO] [stdout] | [INFO] [stdout] 106 | ...mitment.clone(), challenge, commitment.g.clone(), commitment.h.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `commitment.g` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pedersen_commitments.rs:106:155 [INFO] [stdout] | [INFO] [stdout] 106 | ...enge, commitment.g.clone(), commitment.h.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `commitment.h` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Fp, 4>` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:87:32 [INFO] [stdout] | [INFO] [stdout] 87 | Some(y_i) => { y_i.clone() } [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*y_i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Fp, 4>` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:99:36 [INFO] [stdout] | [INFO] [stdout] 99 | Some(y_j) => { y_j.clone() } [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*y_j` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:124:46 [INFO] [stdout] | [INFO] [stdout] 124 | pub fn sign(sk: &PSPrivateKey, messages: &Vec, rng: &mut StdRng) -> Result { [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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 124 - pub fn sign(sk: &PSPrivateKey, messages: &Vec, rng: &mut StdRng) -> Result { [INFO] [stdout] 124 + pub fn sign(sk: &PSPrivateKey, messages: &[PSMessage], rng: &mut StdRng) -> Result { [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/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: manual implementation of an assign operation [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:137:13 [INFO] [stdout] | [INFO] [stdout] 137 | exponent = exponent + y_i.clone() * message.message(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `exponent += y_i.clone() * message.message()` [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: 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: using `clone` on type `Fp, 4>` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:137:35 [INFO] [stdout] | [INFO] [stdout] 137 | exponent = exponent + y_i.clone() * message.message(); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `*y_i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:162:72 [INFO] [stdout] | [INFO] [stdout] 162 | pub fn derive(pk: &PSPublicKey, signature: &PSSignature, messages: &Vec, disclosed_indices: &Vec, rng: &mut S... [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] 162 - pub fn derive(pk: &PSPublicKey, signature: &PSSignature, messages: &Vec, disclosed_indices: &Vec, rng: &mut StdRng) -> Result { [INFO] [stdout] 162 + pub fn derive(pk: &PSPublicKey, signature: &PSSignature, messages: &[PSMessage], disclosed_indices: &Vec, rng: &mut StdRng) -> Result { [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/our_impl/pointcheval_sanders/ps_signature.rs:163:53 [INFO] [stdout] | [INFO] [stdout] 163 | 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] 163 - fn complementary_indices(disclosed_indices: &Vec, len: usize) -> Vec { [INFO] [stdout] 163 + fn complementary_indices(disclosed_indices: &[usize], len: usize) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(Affine, Affine)` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:189:35 [INFO] [stdout] | [INFO] [stdout] 189 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(Affine, Affine)` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:204:35 [INFO] [stdout] | [INFO] [stdout] 204 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Affine` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:220:39 [INFO] [stdout] | [INFO] [stdout] 220 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(Affine, Affine)` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:259:39 [INFO] [stdout] | [INFO] [stdout] 259 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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:149:61 [INFO] [stdout] | [INFO] [stdout] 149 | 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: using `clone` on type `(Affine, Affine)` which implements the `Copy` trait [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:276:39 [INFO] [stdout] | [INFO] [stdout] 276 | Some(result) => { result.clone() } [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*result` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `des.get(0)` [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:328:34 [INFO] [stdout] | [INFO] [stdout] 328 | let cursor = Cursor::new(des.get(0).unwrap()); [INFO] [stdout] | ^^^^^^^^^^ help: try: `des.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:218:37 [INFO] [stdout] | [INFO] [stdout] 218 | 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: you are using an explicit closure for cloning elements [INFO] [stdout] --> src/our_impl/pointcheval_sanders/ps_signature.rs:394:34 [INFO] [stdout] | [INFO] [stdout] 394 | let disclosed_messages = messages.iter().filter(|message| { [INFO] [stdout] | __________________________________^ [INFO] [stdout] 395 | | disclosed_indices.contains(&message.index()) [INFO] [stdout] 396 | | }).map(|message| { message.clone() }).collect(); [INFO] [stdout] | |_____________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] help: consider calling the dedicated `cloned` method [INFO] [stdout] | [INFO] [stdout] 394 ~ let disclosed_messages = messages.iter().filter(|message| { [INFO] [stdout] 395 + disclosed_indices.contains(&message.index()) [INFO] [stdout] 396 ~ }).cloned().collect(); [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/merkle_trees.rs:249:45 [INFO] [stdout] | [INFO] [stdout] 249 | 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] 249 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 249 + 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:266:46 [INFO] [stdout] | [INFO] [stdout] 266 | 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:278:73 [INFO] [stdout] | [INFO] [stdout] 278 | 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:278:92 [INFO] [stdout] | [INFO] [stdout] 278 | 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:286:34 [INFO] [stdout] | [INFO] [stdout] 286 | 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] [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/hmac.rs:51:26 [INFO] [stdout] | [INFO] [stdout] 51 | fn compute_hmac(key: &String, value: &String, jwk: &Vec) -> Result { [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] 51 ~ fn compute_hmac(key: &str, value: &String, jwk: &Vec) -> Result { [INFO] [stdout] 52 | [INFO] [stdout] ... [INFO] [stdout] 57 | [INFO] [stdout] 58 ~ let mut text = key.to_owned(); [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/hmac.rs:60:23 [INFO] [stdout] | [INFO] [stdout] 60 | text.push_str(&value); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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/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] [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/hmac.rs:98:52 [INFO] [stdout] | [INFO] [stdout] 98 | let hmacs: Vec = decode_hmac_value(&hmacs_value)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `hmacs_value` [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/hashes/hmac.rs:103:33 [INFO] [stdout] | [INFO] [stdout] 103 | let key = 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/hashes/hmac.rs:119:55 [INFO] [stdout] | [INFO] [stdout] 119 | let hmac = Self::compute_hmac(&field, value, &jwk)?; [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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 seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/sd_algorithms/hashes/hmac.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | / match vc.remove(CLAIMS) { [INFO] [stdout] 175 | | None => { return Err("Claims removed should not be none here.".to_string()) } [INFO] [stdout] 176 | | Some(_) => { } [INFO] [stdout] 177 | | } [INFO] [stdout] | |_________^ help: try: `if vc.remove(CLAIMS) == None { return Err("Claims removed should not be none here.".to_string()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` 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/hmac.rs:215:59 [INFO] [stdout] | [INFO] [stdout] 215 | 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] 215 + 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/hashes/hmac.rs:219:76 [INFO] [stdout] | [INFO] [stdout] 219 | let key_value_container: Map = Self::get_and_decode(&mut vp, KVC.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] 219 - let key_value_container: Map = Self::get_and_decode(&mut vp, KVC.to_string())?; [INFO] [stdout] 219 + let key_value_container: Map = Self::get_and_decode(&vp, KVC.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/hmac.rs:230:53 [INFO] [stdout] | [INFO] [stdout] 230 | 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] 230 - let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] 230 + 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/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: module has the same name as its containing module [INFO] [stdout] --> src/sd_algorithms/monoclaim/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod monoclaim; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` 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/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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/monoclaim/monoclaim.rs:134:43 [INFO] [stdout] | [INFO] [stdout] 134 | let claims = Self::extract_claims(&vc)?; [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: 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/monoclaim/monoclaim.rs:135:29 [INFO] [stdout] | [INFO] [stdout] 135 | Self::verify_claims(&claims, &issuer_public_key) [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: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/monoclaim/monoclaim.rs:153:46 [INFO] [stdout] | [INFO] [stdout] 153 | 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] 153 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 153 + 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] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/monoclaim/monoclaim.rs:173:29 [INFO] [stdout] | [INFO] [stdout] 173 | Self::verify_claims(&claims, &issuer_public_key)?; [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: `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: 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: 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: 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/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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/ps.rs:37:58 [INFO] [stdout] | [INFO] [stdout] 37 | let claims_bytes = Self::convert_claims_to_bytes(&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/signatures/ps.rs:54:67 [INFO] [stdout] | [INFO] [stdout] 54 | let disclosed_claim_bytes = Self::convert_claims_to_bytes(&disclosed_claims)?; [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/sd_algorithms/signatures/ps.rs:56:39 [INFO] [stdout] | [INFO] [stdout] 56 | PSMessage::new_from_bytes(index.clone(), claim_bytes.as_slice()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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/ps.rs:85:86 [INFO] [stdout] | [INFO] [stdout] 85 | 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/ps.rs:132:44 [INFO] [stdout] | [INFO] [stdout] 132 | 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] 132 - let claims = &Self::extract_claims(&mut vp)?.clone(); [INFO] [stdout] 132 + 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/ps.rs:134:46 [INFO] [stdout] | [INFO] [stdout] 134 | let 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] 134 - let signature = Self::get_and_decode(&mut vp, SIGNATURE.to_string())?; [INFO] [stdout] 134 + let signature = Self::get_and_decode(&vp, SIGNATURE.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/ps.rs:141:45 [INFO] [stdout] | [INFO] [stdout] 141 | 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] 141 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 141 + 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:149:61 [INFO] [stdout] | [INFO] [stdout] 149 | 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/cl.rs:42:72 [INFO] [stdout] | [INFO] [stdout] 42 | let messages: Vec = Self::convert_claims_to_bytes(&claims)?.iter().map( [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/signatures/cl.rs:68:97 [INFO] [stdout] | [INFO] [stdout] 68 | let messages: Vec = CLInstance::convert_claims_to_messages::(&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: the function `Self::extract_claims` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/cl.rs:123:43 [INFO] [stdout] | [INFO] [stdout] 123 | let claims = Self::extract_claims(&mut vp)?; [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] 123 - let claims = Self::extract_claims(&mut vp)?; [INFO] [stdout] 123 + let claims = Self::extract_claims(&vp)?; [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:218:37 [INFO] [stdout] | [INFO] [stdout] 218 | 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::get_and_decode` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/cl.rs:129:80 [INFO] [stdout] | [INFO] [stdout] 129 | let cl_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] 129 - let cl_signature: Signature = Self::get_and_decode(&mut vp, SIGNATURE.to_string())?; [INFO] [stdout] 129 + let cl_signature: Signature = Self::get_and_decode(&vp, SIGNATURE.to_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/signatures/cl.rs:131:49 [INFO] [stdout] | [INFO] [stdout] 131 | let bases: Bases = Self::get_and_decode(&mut vp, BASES.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] 131 - let bases: Bases = Self::get_and_decode(&mut vp, BASES.to_string())?; [INFO] [stdout] 131 + let bases: Bases = Self::get_and_decode(&vp, BASES.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/cl.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | &commitment_pk, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `commitment_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::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/cl.rs:147:45 [INFO] [stdout] | [INFO] [stdout] 147 | 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] 147 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 147 + 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/hashes/merkle_trees.rs:249:45 [INFO] [stdout] | [INFO] [stdout] 249 | 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] 249 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 249 + 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:266:46 [INFO] [stdout] | [INFO] [stdout] 266 | 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/signatures/cl.rs:174:89 [INFO] [stdout] | [INFO] [stdout] 174 | let disclosed_messages = CLInstance::convert_claims_to_messages::(&disclosed_claims)?; [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:278:73 [INFO] [stdout] | [INFO] [stdout] 278 | 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: 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/hashes/merkle_trees.rs:278:92 [INFO] [stdout] | [INFO] [stdout] 278 | 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:286:34 [INFO] [stdout] | [INFO] [stdout] 286 | 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] [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: the function `MerkleTreeInstance::issue_vc` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/hashes/merkle_trees.rs:324:61 [INFO] [stdout] | [INFO] [stdout] 324 | 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] 324 - let (vc, _jwt) = match MerkleTreeInstance::issue_vc(&mut raw_vc, &issuer_private_key) { [INFO] [stdout] 324 + let (vc, _jwt) = match MerkleTreeInstance::issue_vc(&raw_vc, &issuer_private_key) { [INFO] [stdout] | [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/sd_algorithms/hashes/hmac.rs:51:26 [INFO] [stdout] | [INFO] [stdout] 51 | fn compute_hmac(key: &String, value: &String, jwk: &Vec) -> Result { [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] 51 ~ fn compute_hmac(key: &str, value: &String, jwk: &Vec) -> Result { [INFO] [stdout] 52 | [INFO] [stdout] ... [INFO] [stdout] 57 | [INFO] [stdout] 58 ~ let mut text = key.to_owned(); [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/hmac.rs:60:23 [INFO] [stdout] | [INFO] [stdout] 60 | text.push_str(&value); [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/hashes/hmac.rs:98:52 [INFO] [stdout] | [INFO] [stdout] 98 | let hmacs: Vec = decode_hmac_value(&hmacs_value)?; [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `hmacs_value` [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/hashes/hmac.rs:103:33 [INFO] [stdout] | [INFO] [stdout] 103 | let key = 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/hashes/hmac.rs:119:55 [INFO] [stdout] | [INFO] [stdout] 119 | let hmac = Self::compute_hmac(&field, value, &jwk)?; [INFO] [stdout] | ^^^^^^ help: change this to: `field` [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 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: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/sd_algorithms/hashes/hmac.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | / match vc.remove(CLAIMS) { [INFO] [stdout] 175 | | None => { return Err("Claims removed should not be none here.".to_string()) } [INFO] [stdout] 176 | | Some(_) => { } [INFO] [stdout] 177 | | } [INFO] [stdout] | |_________^ help: try: `if vc.remove(CLAIMS) == None { return Err("Claims removed should not be none here.".to_string()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` 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/hmac.rs:215:59 [INFO] [stdout] | [INFO] [stdout] 215 | 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] 215 + 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/hashes/hmac.rs:219:76 [INFO] [stdout] | [INFO] [stdout] 219 | let key_value_container: Map = Self::get_and_decode(&mut vp, KVC.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] 219 - let key_value_container: Map = Self::get_and_decode(&mut vp, KVC.to_string())?; [INFO] [stdout] 219 + let key_value_container: Map = Self::get_and_decode(&vp, KVC.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/hmac.rs:230:53 [INFO] [stdout] | [INFO] [stdout] 230 | 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] 230 - let jwt: String = Self::encode_and_sign_jwt(&mut vp, holder_private_key)?; [INFO] [stdout] 230 + let jwt: String = Self::encode_and_sign_jwt(&vp, holder_private_key)?; [INFO] [stdout] | [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] [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: 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/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: module has the same name as its containing module [INFO] [stdout] --> src/sd_algorithms/monoclaim/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | pub mod monoclaim; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` 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/monoclaim/monoclaim.rs:134:43 [INFO] [stdout] | [INFO] [stdout] 134 | let claims = Self::extract_claims(&vc)?; [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/monoclaim/monoclaim.rs:135:29 [INFO] [stdout] | [INFO] [stdout] 135 | Self::verify_claims(&claims, &issuer_public_key) [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: the function `Self::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/monoclaim/monoclaim.rs:153:46 [INFO] [stdout] | [INFO] [stdout] 153 | 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] 153 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 153 + 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/monoclaim/monoclaim.rs:173:29 [INFO] [stdout] | [INFO] [stdout] 173 | Self::verify_claims(&claims, &issuer_public_key)?; [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: `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: 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 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: 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: 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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/sd_algorithms/signatures/ps.rs:37:58 [INFO] [stdout] | [INFO] [stdout] 37 | let claims_bytes = Self::convert_claims_to_bytes(&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/signatures/ps.rs:54:67 [INFO] [stdout] | [INFO] [stdout] 54 | let disclosed_claim_bytes = Self::convert_claims_to_bytes(&disclosed_claims)?; [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/sd_algorithms/signatures/ps.rs:56:39 [INFO] [stdout] | [INFO] [stdout] 56 | PSMessage::new_from_bytes(index.clone(), claim_bytes.as_slice()) [INFO] [stdout] | ^^^^^^^^^^^^^ help: try dereferencing it: `*index` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [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/ps.rs:85:86 [INFO] [stdout] | [INFO] [stdout] 85 | 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/ps.rs:132:44 [INFO] [stdout] | [INFO] [stdout] 132 | 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] 132 - let claims = &Self::extract_claims(&mut vp)?.clone(); [INFO] [stdout] 132 + 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/ps.rs:134:46 [INFO] [stdout] | [INFO] [stdout] 134 | let 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] 134 - let signature = Self::get_and_decode(&mut vp, SIGNATURE.to_string())?; [INFO] [stdout] 134 + let signature = Self::get_and_decode(&vp, SIGNATURE.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/ps.rs:141:45 [INFO] [stdout] | [INFO] [stdout] 141 | 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] 141 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 141 + 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/signatures/cl.rs:42:72 [INFO] [stdout] | [INFO] [stdout] 42 | let messages: Vec = Self::convert_claims_to_bytes(&claims)?.iter().map( [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/signatures/cl.rs:68:97 [INFO] [stdout] | [INFO] [stdout] 68 | let messages: Vec = CLInstance::convert_claims_to_messages::(&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: the function `Self::extract_claims` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/cl.rs:123:43 [INFO] [stdout] | [INFO] [stdout] 123 | let claims = Self::extract_claims(&mut vp)?; [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] 123 - let claims = Self::extract_claims(&mut vp)?; [INFO] [stdout] 123 + let claims = Self::extract_claims(&vp)?; [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/cl.rs:129:80 [INFO] [stdout] | [INFO] [stdout] 129 | let cl_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] 129 - let cl_signature: Signature = Self::get_and_decode(&mut vp, SIGNATURE.to_string())?; [INFO] [stdout] 129 + let cl_signature: Signature = Self::get_and_decode(&vp, SIGNATURE.to_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/signatures/cl.rs:131:49 [INFO] [stdout] | [INFO] [stdout] 131 | let bases: Bases = Self::get_and_decode(&mut vp, BASES.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] 131 - let bases: Bases = Self::get_and_decode(&mut vp, BASES.to_string())?; [INFO] [stdout] 131 + let bases: Bases = Self::get_and_decode(&vp, BASES.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/cl.rs:136:13 [INFO] [stdout] | [INFO] [stdout] 136 | &commitment_pk, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `commitment_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::encode_and_sign_jwt` doesn't need a mutable reference [INFO] [stdout] --> src/sd_algorithms/signatures/cl.rs:147:45 [INFO] [stdout] | [INFO] [stdout] 147 | 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] 147 - let jwt = Self::encode_and_sign_jwt(&mut vp, &holder_private_key)?; [INFO] [stdout] 147 + 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/signatures/cl.rs:174:89 [INFO] [stdout] | [INFO] [stdout] 174 | let disclosed_messages = CLInstance::convert_claims_to_messages::(&disclosed_claims)?; [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/signatures/cl.rs:240:42 [INFO] [stdout] | [INFO] [stdout] 240 | match CLInstance::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/cl.rs:248:75 [INFO] [stdout] | [INFO] [stdout] 248 | let (_vp, vp_jwt) = match CLInstance::issue_vp(&vc, &disclosures, &issuer_pk, &commitment_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/cl.rs:253:46 [INFO] [stdout] | [INFO] [stdout] 253 | match CLInstance::verify_vp(&vp_jwt, &issuer_pk, &commitment_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: 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/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: 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: 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] [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: 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: 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:334:27 [INFO] [stdout] | [INFO] [stdout] 334 | 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/hashes/hmac.rs:296:27 [INFO] [stdout] | [INFO] [stdout] 296 | 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/monoclaim/monoclaim.rs:213:27 [INFO] [stdout] | [INFO] [stdout] 213 | 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: useless use of `vec!` [INFO] [stdout] --> src/sd_algorithms/signatures/ps.rs:211:27 [INFO] [stdout] | [INFO] [stdout] 211 | 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/cl.rs:245:27 [INFO] [stdout] | [INFO] [stdout] 245 | 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: function `single_pseudo_credential` is never used [INFO] [stdout] --> src/main.rs:221:4 [INFO] [stdout] | [INFO] [stdout] 221 | fn single_pseudo_credential(disclosures: Vec, iterations: i8, consumer: Display) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) 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:41:67 [INFO] [stdout] | [INFO] [stdout] 41 | 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:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | 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:86:27 [INFO] [stdout] | [INFO] [stdout] 86 | 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:197:107 [INFO] [stdout] | [INFO] [stdout] 197 | 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: function `single_pseudo_credential` is never used [INFO] [stdout] --> src/main.rs:221:4 [INFO] [stdout] | [INFO] [stdout] 221 | fn single_pseudo_credential(disclosures: Vec, iterations: i8, consumer: Display) -> Result<(), String> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) 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:41:67 [INFO] [stdout] | [INFO] [stdout] 41 | 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:85:13 [INFO] [stdout] | [INFO] [stdout] 85 | 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:86:27 [INFO] [stdout] | [INFO] [stdout] 86 | 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:197:107 [INFO] [stdout] | [INFO] [stdout] 197 | 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 4m 29s [INFO] running `Command { std: "docker" "inspect" "9a56bf6794668c6f8f17c50ba7f90039e59548e4801f3c94d39cdb2bf9f5ae41", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "9a56bf6794668c6f8f17c50ba7f90039e59548e4801f3c94d39cdb2bf9f5ae41", kill_on_drop: false }` [INFO] [stdout] 9a56bf6794668c6f8f17c50ba7f90039e59548e4801f3c94d39cdb2bf9f5ae41