MCPcopy Create free account
hub / github.com/bajrangCoder/setu / format_size

Method format_size

src/components/audio_player.rs:359–367  ·  view source on GitHub ↗
(bytes: usize)

Source from the content-addressed store, hash-verified

357 format!("{} B", bytes)
358 } else if bytes < 1024 * 1024 {
359 format!("{:.1} KB", bytes as f64 / 1024.0)
360 } else {
361 format!("{:.1} MB", bytes as f64 / (1024.0 * 1024.0))
362 }
363 }
364
365 fn volume_percent(&self) -> u32 {
366 (self.volume * 100.0).round() as u32
367 }
368
369 fn status_text(&self) -> &'static str {
370 match self.playback_state {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected