lb-rs 26.4.13

The rust library for interacting with your lockbook.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use lb_rs::model::usage::bytes_to_human;

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

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

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