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

Function to_string_short

src/display.rs:319–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

317
318 #[test]
319 fn to_string_short() {
320 let display = Display {
321 byte_size: ByteSize::gib(1),
322 format: Format::IecShort,
323 };
324 assert_eq!("1.0G", display.to_string());
325
326 let display = Display {
327 byte_size: ByteSize::gb(1),
328 format: Format::IecShort,
329 };
330 assert_eq!("953.7M", display.to_string());
331 }
332
333 #[track_caller]
334 fn assert_to_string(expected: &str, byte_size: ByteSize, format: Format) {

Callers

nothing calls this directly

Calls 2

gibFunction · 0.85
gbFunction · 0.85

Tested by

no test coverage detected