style: reorder imports and reformat code for consistency

This commit is contained in:
Andrew Phillips
2025-05-10 10:06:33 -03:00
committed by Andrew Phillips (aider)
parent c936326ac3
commit 9feec61759
13 changed files with 492 additions and 356 deletions

View File

@@ -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(),
}
}