Fix doc tests for human.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
fd7b9fd1b8
commit
f0f90a6b80
@ -1,40 +1,25 @@
|
||||
#![allow(dead_code)]
|
||||
#![doc(html_root_url = "https://docs.rs/human_format")]
|
||||
|
||||
//! From https://raw.githubusercontent.com/BobGneu/human-format-rs/master/src/lib.rs
|
||||
//! `human_format` provides facilitates creating a formatted string, converting between numbers that are beyond typical
|
||||
//! `human` provides facilitates creating a formatted string, converting between numbers that are beyond typical
|
||||
//! needs for humans into a simpler string that conveys the gist of the meaning of the number.
|
||||
//!
|
||||
//! ## Setup
|
||||
//!
|
||||
//! Add the library to your dependencies listing
|
||||
//!
|
||||
//! ```toml
|
||||
//! [dependencies]
|
||||
//! human_format = "0.2"
|
||||
//! ```
|
||||
//!
|
||||
//! Add the crate reference at your crate root
|
||||
//!
|
||||
//! ```rust
|
||||
//! extern crate human_format;
|
||||
//! ```
|
||||
//!
|
||||
//! Print some human readable strings
|
||||
//!
|
||||
//! ```rust
|
||||
//! use rtiow::human;
|
||||
//!
|
||||
//! // "1.00 k"
|
||||
//! let tmpStr = human_format::Formatter::new()
|
||||
//! let tmpStr = human::Formatter::new()
|
||||
//! .format(1000.0);
|
||||
//! # assert_eq!(tmpStr, "1.00 k");
|
||||
//!
|
||||
//! // "1.00 M"
|
||||
//! let tmpStr2 = human_format::Formatter::new()
|
||||
//! let tmpStr2 = human::Formatter::new()
|
||||
//! .format(1000000.0);
|
||||
//! # assert_eq!(tmpStr2, "1.00 M");
|
||||
//!
|
||||
//! // "1.00 B"
|
||||
//! let tmpStr3 = human_format::Formatter::new()
|
||||
//! let tmpStr3 = human::Formatter::new()
|
||||
//! .format(1000000000.0);
|
||||
//! # assert_eq!(tmpStr3, "1.00 B");
|
||||
//! ```
|
||||
|
||||
@ -6,7 +6,7 @@ pub mod cuboid;
|
||||
pub mod flip_normals;
|
||||
pub mod hitable;
|
||||
pub mod hitable_list;
|
||||
mod human;
|
||||
pub mod human;
|
||||
pub mod kdtree;
|
||||
pub mod material;
|
||||
pub mod moving_sphere;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user