5 releases
Uses old Rust 2015
0.1.4 | Dec 23, 2023 |
---|---|
0.1.3 | Nov 25, 2023 |
0.1.2 | Mar 28, 2023 |
0.1.1 | Mar 28, 2023 |
0.1.0 | Mar 28, 2023 |
#5 in #pad
21 downloads per month
7KB
114 lines
Maple lib tools
A simple tools library for MapleImage.
usage
Add this to your Cargo.toml:
[dependencies]
maple_lib = "0.1.3"
Examples
use maple_lib::human_format;
use std::time::Duration;
let result = human_format(Duration::from_secs(59));
assert_eq!(result, "00h:00m:59s");
use maple_lib::pad_start;
let result = pad_start("hello", 10, ' ');
assert_eq!(result, " hello");
use maple_lib::execution_time;
let result = execution_time(|| {
1+1
});
assert_eq!(result.0, 1);
publish
cargo publish --registry crates-io
# 然后输入.env中的密钥即可