lints
This commit is contained in:
@@ -136,5 +136,5 @@ pub async fn test_all() {
|
||||
test_enc_dec().await;
|
||||
test_dh(crypto).await;
|
||||
shutdown(api.clone()).await;
|
||||
assert_eq!(api.is_shutdown(), true);
|
||||
assert!(api.is_shutdown());
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
#![allow(clippy::bool_assert_comparison)]
|
||||
|
||||
use crate::dht::key;
|
||||
use crate::xx::*;
|
||||
use core::convert::TryFrom;
|
||||
@@ -104,9 +106,9 @@ pub async fn test_key_conversions() {
|
||||
// Test default key
|
||||
let (dht_key, dht_key_secret) = (key::DHTKey::default(), key::DHTKeySecret::default());
|
||||
assert_eq!(dht_key.bytes, EMPTY_KEY);
|
||||
assert_eq!(dht_key.valid, false);
|
||||
assert!(!dht_key.valid);
|
||||
assert_eq!(dht_key_secret.bytes, EMPTY_KEY_SECRET);
|
||||
assert_eq!(dht_key_secret.valid, false);
|
||||
assert!(!dht_key_secret.valid);
|
||||
let dht_key_string = String::from(&dht_key);
|
||||
trace!("dht_key_string: {:?}", dht_key_string);
|
||||
let dht_key_string2 = String::from(&dht_key);
|
||||
|
@@ -152,8 +152,7 @@ pub async fn test_cbor(ts: TableStore) {
|
||||
let d = match db.load_cbor::<key::DHTKey>(0, b"asdf").await {
|
||||
Ok(x) => x,
|
||||
Err(e) => {
|
||||
assert!(false, "couldn't decode cbor: {}", e);
|
||||
return;
|
||||
panic!("couldn't decode cbor: {}", e);
|
||||
}
|
||||
};
|
||||
assert_eq!(d, Some(dht_key), "keys should be equal");
|
||||
|
@@ -1,3 +1,5 @@
|
||||
#![allow(clippy::bool_assert_comparison)]
|
||||
|
||||
use crate::xx::*;
|
||||
use crate::*;
|
||||
cfg_if! {
|
||||
@@ -227,7 +229,7 @@ pub async fn test_config() {
|
||||
Ok(()) => (),
|
||||
Err(e) => {
|
||||
error!("Error: {}", e);
|
||||
assert!(false);
|
||||
unreachable!();
|
||||
}
|
||||
}
|
||||
let inner = vc.get();
|
||||
|
Reference in New Issue
Block a user