Skip to content

Use List instead of Vec<Var> throughout

Sign in for the full log view
GitHub Actions / clippy succeeded Dec 23, 2024 in 0s

clippy

3 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 3
Note 0
Help 0

Versions

  • rustc 1.83.0 (90b35a623 2024-11-26)
  • cargo 1.83.0 (5ffbef321 2024-10-29)
  • clippy 0.1.83 (90b35a6 2024-11-26)

Annotations

Check warning on line 341 in crates/rpc/rpc-common/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
   --> crates/rpc/rpc-common/src/lib.rs:341:28
    |
341 |     let pub_key: Key<32> = Key::try_from(public_key.to_bytes())
    |                            ^^^^^^^^^^^^^ help: use: `From::from`
    |
    = note: converting `[u8; 32]` to `Key<32>` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions

Check warning on line 339 in crates/rpc/rpc-common/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
   --> crates/rpc/rpc-common/src/lib.rs:339:29
    |
339 |     let priv_key: Key<64> = Key::try_from(private_key.to_keypair_bytes())
    |                             ^^^^^^^^^^^^^ help: use: `From::from`
    |
    = note: converting `[u8; 64]` to `Key<64>` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
    = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default

Check warning on line 229 in crates/common/src/var/list.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true

warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
   --> crates/common/src/var/list.rs:229:1
    |
229 | impl Into<Var> for List {
    | ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into
    = note: `#[warn(clippy::from_over_into)]` on by default
help: replace the `Into` implementation with `From<var::list::List>`
    |
229 ~ impl From<List> for Var {
230 ~     fn from(val: List) -> Self {
231 ~         Var::from_variant(Variant::List(val))
    |