Rust 2021 Macro Warning Cleanup (#3658)

* small warning cleanup

* remove unused imports in tests
This commit is contained in:
Yeastplume 2021-11-02 15:10:01 +00:00 committed by GitHub
parent 2e2149859f
commit 0170f03e4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 4 additions and 10 deletions

View file

@ -139,7 +139,7 @@ macro_rules! right_path_element(
match $req.uri().path().trim_end_matches('/').rsplit('/').next() {
None => return response(StatusCode::BAD_REQUEST, "invalid url"),
Some(el) => el,
};
}
));
#[macro_export]

View file

@ -20,7 +20,7 @@
#[macro_export]
macro_rules! map_vec {
($thing:expr, $mapfn:expr) => {
$thing.iter().map($mapfn).collect::<Vec<_>>();
$thing.iter().map($mapfn).collect::<Vec<_>>()
};
}

View file

@ -18,7 +18,6 @@ use self::core::core::hash::Hashed;
use self::core::global;
use self::keychain::{ExtKeychain, Keychain};
use self::pool::PoolError;
use self::util::RwLock;
use crate::common::*;
use grin_core as core;
use grin_keychain as keychain;

View file

@ -18,7 +18,6 @@ pub mod common;
use self::core::core::hash::Hashed;
use self::core::global;
use self::keychain::{ExtKeychain, Keychain};
use self::util::RwLock;
use crate::common::*;
use grin_core as core;
use grin_keychain as keychain;

View file

@ -17,7 +17,6 @@ pub mod common;
use self::core::core::hash::Hashed;
use self::core::global;
use self::keychain::{ExtKeychain, Keychain};
use self::util::RwLock;
use crate::common::ChainAdapter;
use crate::common::*;
use grin_core as core;

View file

@ -21,7 +21,6 @@ use self::core::global;
use self::core::libtx::aggsig;
use self::keychain::{BlindingFactor, ExtKeychain, Keychain};
use self::pool::types::PoolError;
use self::util::RwLock;
use crate::common::*;
use grin_core as core;
use grin_keychain as keychain;

View file

@ -19,7 +19,6 @@ use self::core::core::{HeaderVersion, KernelFeatures, NRDRelativeHeight};
use self::core::global;
use self::keychain::{ExtKeychain, Keychain};
use self::pool::types::PoolError;
use self::util::RwLock;
use crate::common::*;
use grin_core as core;
use grin_keychain as keychain;

View file

@ -19,7 +19,6 @@ use self::core::core::{HeaderVersion, KernelFeatures, NRDRelativeHeight};
use self::core::global;
use self::keychain::{ExtKeychain, Keychain};
use self::pool::types::PoolError;
use self::util::RwLock;
use crate::common::*;
use grin_core as core;
use grin_keychain as keychain;

View file

@ -297,7 +297,7 @@ fn test_status_txhashset_kernels() {
kernels_total: 5000,
};
let basic_status = TUIStatusView::update_sync_status(status);
assert!(basic_status.contains("4%"), basic_status);
assert!(basic_status.contains("4%"), "{}", basic_status);
}
#[test]
@ -307,5 +307,5 @@ fn test_status_txhashset_rproofs() {
rproofs_total: 1000,
};
let basic_status = TUIStatusView::update_sync_status(status);
assert!(basic_status.contains("64%"), basic_status);
assert!(basic_status.contains("64%"), "{}", basic_status);
}