MCPcopy Create free account
hub / github.com/bytesize-rs/bytesize / to_string_iec

Function to_string_iec

src/display.rs:289–301  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

287
288 #[test]
289 fn to_string_iec() {
290 let display = Display {
291 byte_size: ByteSize::gib(1),
292 format: Format::Iec,
293 };
294 assert_eq!("1.0 GiB", display.to_string());
295
296 let display = Display {
297 byte_size: ByteSize::gb(1),
298 format: Format::Iec,
299 };
300 assert_eq!("953.7 MiB", display.to_string());
301 }
302
303 #[test]
304 fn to_string_si() {

Callers

nothing calls this directly

Calls 2

gibFunction · 0.85
gbFunction · 0.85

Tested by

no test coverage detected