fixed missing dependency of ctr in v1-aead-extra #64
clippy-macos-latest
6 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 6 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.76.0-nightly (8c2b57721 2023-12-01)
- cargo 1.76.0-nightly (26333c732 2023-11-28)
- clippy 0.1.76 (8c2b5772 2023-12-01)
Annotations
Check warning on line 19 in src/v2/udp/mod.rs
github-actions / clippy-macos-latest
large size difference between variants
warning: large size difference between variants
--> src/v2/udp/mod.rs:14:1
|
14 | / enum CipherVariant {
15 | | AesGcm(AesGcmCipher),
| | -------------------- the largest variant contains at least 560 bytes
16 | | ChaCha20Poly1305(ChaCha20Poly1305Cipher),
| | ---------------------------------------- the second-largest variant contains at least 32 bytes
17 | | #[cfg(feature = "v2-extra")]
18 | | ChaCha8Poly1305(ChaCha8Poly1305Cipher),
19 | | }
| |_^ the entire enum is at least 560 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
|
15 | AesGcm(Box<AesGcmCipher>),
| ~~~~~~~~~~~~~~~~~
Check warning on line 45 in src/v1/cipher.rs
github-actions / clippy-macos-latest
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> src/v1/cipher.rs:45:22
|
45 | m.update(&digest);
| ^^^^^^^ help: change this to: `digest`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
Check warning on line 31 in src/v1/streamcipher/table.rs
github-actions / clippy-macos-latest
use Vec::sort_by_key here instead
warning: use Vec::sort_by_key here instead
--> src/v1/streamcipher/table.rs:31:13
|
31 | table.sort_by(|x, y| (a % (*x + i)).cmp(&(a % (*y + i))))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `table.sort_by_key(|x| a % (*x + i))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by
= note: `#[warn(clippy::unnecessary_sort_by)]` on by default
Check warning on line 66 in src/v1/streamcipher/crypto/rc4.rs
github-actions / clippy-macos-latest
the loop variable `counter` is only used to index `data`
warning: the loop variable `counter` is only used to index `data`
--> src/v1/streamcipher/crypto/rc4.rs:66:24
|
66 | for counter in 0..data.len() {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator
|
66 | for <item> in &mut data {
| ~~~~~~ ~~~~~~~~~
Check warning on line 53 in src/v1/streamcipher/crypto/rc4.rs
github-actions / clippy-macos-latest
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/v1/streamcipher/crypto/rc4.rs:53:24
|
53 | state.swap(counter as usize, index2 as usize);
| ^^^^^^^^^^^^^^^^ help: try: `counter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
Check warning on line 113 in src/v1/cipher.rs
github-actions / clippy-macos-latest
constants have by default a `'static` lifetime
warning: constants have by default a `'static` lifetime
--> src/v1/cipher.rs:113:37
|
113 | const SUBKEY_INFO: &'static [u8] = b"ss-subkey";
| -^^^^^^^----- help: consider removing `'static`: `&[u8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default