Skip to content

Commit

Permalink
i found a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
toastxc committed Jul 29, 2024
1 parent 04e96b3 commit 81d873f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helper/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ pub fn format_directory_path(location: String) -> String {
while x.ends_with(crate::PATH_SEP) {
x.pop();
}
if x.ends_with(crate::PATH_SEP) == false {
if !x.ends_with(crate::PATH_SEP) {
x.push_str(crate::PATH_SEP);
}
x
Expand Down Expand Up @@ -340,7 +340,7 @@ pub fn format_size(i: usize) -> String {
dec_l = decimal_points * 5;
}

let dec: String = value.chars().rev().take(dec_l as usize).collect();
let dec: String = value.chars().rev().take(dec_l).collect();

let mut dec_x: String = dec.chars().rev().take(decimal_points).collect();
dec_x = dec_x.trim_end_matches('0').to_string();
Expand Down

0 comments on commit 81d873f

Please sign in to comment.