MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / format_number

Function format_number

crates/opencode-util/src/util.rs:156–164  ·  view source on GitHub ↗
(n: u64)

Source from the content-addressed store, hash-verified

154 }
155
156 pub fn format_number(n: u64) -> String {
157 if n >= 1_000_000 {
158 format!("{:.1}M", n as f64 / 1_000_000.0)
159 } else if n >= 1_000 {
160 format!("{:.1}K", n as f64 / 1_000.0)
161 } else {
162 n.to_string()
163 }
164 }
165}
166
167pub mod git {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected