We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 882d263 + da9433f commit 6630ad4Copy full SHA for 6630ad4
src/lib.rs
@@ -22,9 +22,11 @@
22
//!
23
//! It also provides its human readable string as follows:
24
25
-//! ```ignore=
26
-//! assert_eq!("482 GiB".to_string(), ByteSize::gb(518).to_string(true));
27
-//! assert_eq!("518 GB".to_string(), ByteSize::gb(518).to_string(false));
+//! ```
+//! use bytesize::ByteSize;
+//!
28
+//! assert_eq!("482.4 GiB", ByteSize::gb(518).to_string_as(true));
29
+//! assert_eq!("518.0 GB", ByteSize::gb(518).to_string_as(false));
30
//! ```
31
32
mod parse;
0 commit comments