mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
Rust 2021 Macro Warning Cleanup (#3658)
* small warning cleanup * remove unused imports in tests
This commit is contained in:
parent
2e2149859f
commit
0170f03e4a
9 changed files with 4 additions and 10 deletions
|
@ -139,7 +139,7 @@ macro_rules! right_path_element(
|
||||||
match $req.uri().path().trim_end_matches('/').rsplit('/').next() {
|
match $req.uri().path().trim_end_matches('/').rsplit('/').next() {
|
||||||
None => return response(StatusCode::BAD_REQUEST, "invalid url"),
|
None => return response(StatusCode::BAD_REQUEST, "invalid url"),
|
||||||
Some(el) => el,
|
Some(el) => el,
|
||||||
};
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! map_vec {
|
macro_rules! map_vec {
|
||||||
($thing:expr, $mapfn:expr) => {
|
($thing:expr, $mapfn:expr) => {
|
||||||
$thing.iter().map($mapfn).collect::<Vec<_>>();
|
$thing.iter().map($mapfn).collect::<Vec<_>>()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ use self::core::core::hash::Hashed;
|
||||||
use self::core::global;
|
use self::core::global;
|
||||||
use self::keychain::{ExtKeychain, Keychain};
|
use self::keychain::{ExtKeychain, Keychain};
|
||||||
use self::pool::PoolError;
|
use self::pool::PoolError;
|
||||||
use self::util::RwLock;
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use grin_core as core;
|
use grin_core as core;
|
||||||
use grin_keychain as keychain;
|
use grin_keychain as keychain;
|
||||||
|
|
|
@ -18,7 +18,6 @@ pub mod common;
|
||||||
use self::core::core::hash::Hashed;
|
use self::core::core::hash::Hashed;
|
||||||
use self::core::global;
|
use self::core::global;
|
||||||
use self::keychain::{ExtKeychain, Keychain};
|
use self::keychain::{ExtKeychain, Keychain};
|
||||||
use self::util::RwLock;
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use grin_core as core;
|
use grin_core as core;
|
||||||
use grin_keychain as keychain;
|
use grin_keychain as keychain;
|
||||||
|
|
|
@ -17,7 +17,6 @@ pub mod common;
|
||||||
use self::core::core::hash::Hashed;
|
use self::core::core::hash::Hashed;
|
||||||
use self::core::global;
|
use self::core::global;
|
||||||
use self::keychain::{ExtKeychain, Keychain};
|
use self::keychain::{ExtKeychain, Keychain};
|
||||||
use self::util::RwLock;
|
|
||||||
use crate::common::ChainAdapter;
|
use crate::common::ChainAdapter;
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use grin_core as core;
|
use grin_core as core;
|
||||||
|
|
|
@ -21,7 +21,6 @@ use self::core::global;
|
||||||
use self::core::libtx::aggsig;
|
use self::core::libtx::aggsig;
|
||||||
use self::keychain::{BlindingFactor, ExtKeychain, Keychain};
|
use self::keychain::{BlindingFactor, ExtKeychain, Keychain};
|
||||||
use self::pool::types::PoolError;
|
use self::pool::types::PoolError;
|
||||||
use self::util::RwLock;
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use grin_core as core;
|
use grin_core as core;
|
||||||
use grin_keychain as keychain;
|
use grin_keychain as keychain;
|
||||||
|
|
|
@ -19,7 +19,6 @@ use self::core::core::{HeaderVersion, KernelFeatures, NRDRelativeHeight};
|
||||||
use self::core::global;
|
use self::core::global;
|
||||||
use self::keychain::{ExtKeychain, Keychain};
|
use self::keychain::{ExtKeychain, Keychain};
|
||||||
use self::pool::types::PoolError;
|
use self::pool::types::PoolError;
|
||||||
use self::util::RwLock;
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use grin_core as core;
|
use grin_core as core;
|
||||||
use grin_keychain as keychain;
|
use grin_keychain as keychain;
|
||||||
|
|
|
@ -19,7 +19,6 @@ use self::core::core::{HeaderVersion, KernelFeatures, NRDRelativeHeight};
|
||||||
use self::core::global;
|
use self::core::global;
|
||||||
use self::keychain::{ExtKeychain, Keychain};
|
use self::keychain::{ExtKeychain, Keychain};
|
||||||
use self::pool::types::PoolError;
|
use self::pool::types::PoolError;
|
||||||
use self::util::RwLock;
|
|
||||||
use crate::common::*;
|
use crate::common::*;
|
||||||
use grin_core as core;
|
use grin_core as core;
|
||||||
use grin_keychain as keychain;
|
use grin_keychain as keychain;
|
||||||
|
|
|
@ -297,7 +297,7 @@ fn test_status_txhashset_kernels() {
|
||||||
kernels_total: 5000,
|
kernels_total: 5000,
|
||||||
};
|
};
|
||||||
let basic_status = TUIStatusView::update_sync_status(status);
|
let basic_status = TUIStatusView::update_sync_status(status);
|
||||||
assert!(basic_status.contains("4%"), basic_status);
|
assert!(basic_status.contains("4%"), "{}", basic_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -307,5 +307,5 @@ fn test_status_txhashset_rproofs() {
|
||||||
rproofs_total: 1000,
|
rproofs_total: 1000,
|
||||||
};
|
};
|
||||||
let basic_status = TUIStatusView::update_sync_status(status);
|
let basic_status = TUIStatusView::update_sync_status(status);
|
||||||
assert!(basic_status.contains("64%"), basic_status);
|
assert!(basic_status.contains("64%"), "{}", basic_status);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue