mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
lint
This commit is contained in:
@@ -254,7 +254,7 @@ pub fn fmt_color(color: &Color) -> String {
|
||||
Color::Rgb(255, 255, 0) => "yellow".to_string(),
|
||||
Color::Rgb(154, 205, 50) => "yellowgreen".to_string(),
|
||||
// -- others
|
||||
Color::Rgb(r, g, b) => format!("#{:02x}{:02x}{:02x}", r, g, b),
|
||||
Color::Rgb(r, g, b) => format!("#{r:02x}{g:02x}{b:02x}"),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ pub fn fmt_bytes(v: u64) -> String {
|
||||
} else if v >= 1024 {
|
||||
format!("{} KB", v / 1024)
|
||||
} else {
|
||||
format!("{} B", v)
|
||||
format!("{v} B")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ pub fn create_sample_file() -> NamedTempFile {
|
||||
/// Create sample file with provided content
|
||||
pub fn create_sample_file_with_content(content: impl std::fmt::Display) -> NamedTempFile {
|
||||
let mut tmpfile: tempfile::NamedTempFile = tempfile::NamedTempFile::new().unwrap();
|
||||
writeln!(tmpfile, "{}", content).unwrap();
|
||||
writeln!(tmpfile, "{content}").unwrap();
|
||||
tmpfile
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user