maple_lib 0.1.4

A simple tools library for MapleImage.
Documentation
  • Coverage
  • 80%
    4 out of 5 items documented4 out of 4 items with examples
  • Size
  • Source code size: 6.4 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 141.0 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Robert-Ro

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中的密钥即可