mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-13 11:35:50 +00:00
Run cargo fmt on the whole code base (#9394)
* Run cargo fmt on the whole code base * Second run * Add CI check * Fix compilation * More unnecessary braces * Handle weights * Use --all * Use correct attributes... * Fix UI tests * AHHHHHHHHH * 🤦 * Docs * Fix compilation * 🤷 * Please stop * 🤦 x 2 * More * make rustfmt.toml consistent with polkadot Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
@@ -63,12 +63,7 @@ pub fn reload_filter() -> Result<(), String> {
|
||||
let mut env_filter = EnvFilter::default();
|
||||
if let Some(current_directives) = CURRENT_DIRECTIVES.get() {
|
||||
// Use join and then split in case any directives added together
|
||||
for directive in current_directives
|
||||
.lock()
|
||||
.join(",")
|
||||
.split(',')
|
||||
.map(|d| d.parse())
|
||||
{
|
||||
for directive in current_directives.lock().join(",").split(',').map(|d| d.parse()) {
|
||||
match directive {
|
||||
Ok(dir) => env_filter = env_filter.add_directive(dir),
|
||||
Err(invalid_directive) => {
|
||||
@@ -77,7 +72,7 @@ pub fn reload_filter() -> Result<(), String> {
|
||||
"Unable to parse directive while setting log filter: {:?}",
|
||||
invalid_directive,
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,14 +94,9 @@ pub fn reload_filter() -> Result<(), String> {
|
||||
///
|
||||
/// Includes substrate defaults and CLI supplied directives.
|
||||
pub fn reset_log_filter() -> Result<(), String> {
|
||||
let directive = DEFAULT_DIRECTIVES
|
||||
.get_or_init(|| Mutex::new(Vec::new()))
|
||||
.lock()
|
||||
.clone();
|
||||
let directive = DEFAULT_DIRECTIVES.get_or_init(|| Mutex::new(Vec::new())).lock().clone();
|
||||
|
||||
*CURRENT_DIRECTIVES
|
||||
.get_or_init(|| Mutex::new(Vec::new()))
|
||||
.lock() = directive;
|
||||
*CURRENT_DIRECTIVES.get_or_init(|| Mutex::new(Vec::new())).lock() = directive;
|
||||
reload_filter()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user