MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / format_cost

Function format_cost

atomic-cli/src/commands/agent/attest.rs:639–647  ·  view source on GitHub ↗
(usd: f64)

Source from the content-addressed store, hash-verified

637}
638
639fn format_cost(usd: f64) -> String {
640 if usd == 0.0 {
641 "$0.00".to_string()
642 } else if usd < 0.01 {
643 format!("${:.4}", usd)
644 } else {
645 format!("${:.2}", usd)
646 }
647}
648
649fn format_count(n: usize, word: &str) -> String {
650 if n == 1 {

Callers 1

print_summaryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected