MCPcopy Index your code
hub / github.com/RustPython/RustPython / format_inf

Function format_inf

crates/literal/src/float.rs:41–48  ·  view source on GitHub ↗
(case: Case)

Source from the content-addressed store, hash-verified

39}
40
41fn format_inf(case: Case) -> String {
42 let inf = match case {
43 Case::Lower => "inf",
44 Case::Upper => "INF",
45 };
46
47 inf.to_string()
48}
49
50pub const fn decimal_point_or_empty(precision: usize, alternate_form: bool) -> &'static str {
51 match (precision, alternate_form) {

Callers 3

format_fixedFunction · 0.85
format_exponentFunction · 0.85
format_generalFunction · 0.85

Calls 1

to_stringMethod · 0.80

Tested by

no test coverage detected