lockbook-shared 0.9.4

the code shared between lb and our server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use lockbook_shared::usage::bytes_to_human;

#[test]
fn bytes_to_human_kb() {
    assert_eq!(bytes_to_human(2000), "2 KB".to_string());
}

#[test]
fn bytes_to_human_mb() {
    assert_eq!(bytes_to_human(2000000), "2 MB".to_string());
}

#[test]
fn bytes_to_human_gb() {
    assert_eq!(bytes_to_human(2000000000), "2 GB".to_string());
}