Skip to content

Commit

Permalink
gto
Browse files Browse the repository at this point in the history
Signed-off-by: hqliu <hqliu@mobvoi.com>
  • Loading branch information
smallyard committed Aug 10, 2018
1 parent fd9bae3 commit 62c669e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/tikv-ctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1805,12 +1805,12 @@ fn convert_gbmb(mut bytes: u64) -> String {
const GB: u64 = 1024 * 1024 * 1024;
const MB: u64 = 1024 * 1024;
if bytes < MB {
return format!("{} B ", bytes);
return format!("{} B", bytes);
}
let mb = if bytes % GB == 0 {
String::from("")
} else {
format!("{:.3} MB ", (bytes % GB) as f64 / MB as f64)
format!("{:.3} MB", (bytes % GB) as f64 / MB as f64)
};
bytes /= GB;
let gb = if bytes == 0 {
Expand Down

0 comments on commit 62c669e

Please sign in to comment.