style: reorder imports and reformat code for consistency
This commit is contained in:
committed by
Andrew Phillips (aider)
parent
c936326ac3
commit
9feec61759
@@ -1,8 +1,8 @@
|
||||
use std::env;
|
||||
use std::collections::HashMap;
|
||||
use regex::Regex;
|
||||
use humansize::{FormatSizeOptions, BINARY};
|
||||
use log::debug;
|
||||
use regex::Regex;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
|
||||
pub fn get_meta_from_env() -> HashMap<String, String> {
|
||||
debug!("MAIN: Getting meta from KEEP_META_*");
|
||||
@@ -19,15 +19,14 @@ pub fn get_meta_from_env() -> HashMap<String, String> {
|
||||
}
|
||||
|
||||
pub fn format_size_human_readable(size: u64) -> String {
|
||||
let options = FormatSizeOptions::from(BINARY)
|
||||
.decimal_places(1);
|
||||
let options = FormatSizeOptions::from(BINARY).decimal_places(1);
|
||||
humansize::format_size(size, options)
|
||||
}
|
||||
|
||||
pub fn format_size(size: u64, human_readable: bool) -> String {
|
||||
match human_readable {
|
||||
true => format_size_human_readable(size),
|
||||
false => size.to_string()
|
||||
false => size.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user