mirror of
https://github.com/jht5945/rust_util.git
synced 2025-12-27 15:40:03 +08:00
fix parse_size
This commit is contained in:
@@ -171,7 +171,7 @@ pub fn parse_size(size: &str) -> XResult<i64> {
|
||||
return Ok((SIZE_PB as f64 * no_last_b_size[0..no_last_b_size.len()-1].parse::<f64>()?) as i64);
|
||||
}
|
||||
|
||||
Err(new_box_error(&format!("Cannot parse size: {}", size)))
|
||||
Ok(no_last_b_size.parse::<i64>()?)
|
||||
}
|
||||
|
||||
pub fn get_display_size(size: i64) -> String {
|
||||
|
||||
Reference in New Issue
Block a user