Clippy all targets (#153)
* Fix clippy lints in tests * CI: let clippy lint also tests They deserve equal clippy love, right? :)pull/155/head
parent
4265a1fbf1
commit
72353ed7a9
|
@ -56,4 +56,4 @@ jobs:
|
|||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: -- -D warnings
|
||||
args: --all-targets -- -D warnings
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#![allow(non_upper_case_globals)]
|
||||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_snake_case)]
|
||||
// https://github.com/rust-lang/rust-bindgen/issues/1651
|
||||
#![allow(deref_nullptr)]
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
|
||||
|
|
|
@ -491,22 +491,22 @@ mod test {
|
|||
#[test]
|
||||
fn test_rng_sanity_private() {
|
||||
let first = Key::generate_private();
|
||||
assert!(first.as_bytes() != &[0u8; 32]);
|
||||
assert!(first.as_bytes() != [0u8; 32]);
|
||||
for _ in 0..100_000 {
|
||||
let key = Key::generate_private();
|
||||
assert!(first != key);
|
||||
assert!(key.as_bytes() != &[0u8; 32]);
|
||||
assert!(key.as_bytes() != [0u8; 32]);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rng_sanity_preshared() {
|
||||
let first = Key::generate_preshared();
|
||||
assert!(first.as_bytes() != &[0u8; 32]);
|
||||
assert!(first.as_bytes() != [0u8; 32]);
|
||||
for _ in 0..100_000 {
|
||||
let key = Key::generate_preshared();
|
||||
assert!(first != key);
|
||||
assert!(key.as_bytes() != &[0u8; 32]);
|
||||
assert!(key.as_bytes() != [0u8; 32]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue