si-scale 0.1.0

Formats value using the appropriate SI scale. ``` use si_scale::helpers::{seconds, seconds3}; let actual = format!("{}", seconds(1.3e-5)); let expected = "13 µs"; assert_eq!(actual, expected); let actual = format!("{}", seconds3(1.3e-5)); let expected = "13.000 µs"; assert_eq!(actual, expected); ```
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
.PHONY: nightly coverage

nightly:
	rustup default nightly

coverage: export CARGO_INCREMENTAL := 0
coverage: export RUSTFLAGS := -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort
coverage: export RUSTDOCFLAGS := -Cpanic=abort
coverage: nightly
	@echo $(RUSTFLAGS)
	@echo $(RUSTDOCFLAGS)
	cargo build
	cargo test
	grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing -o ./coverage/