MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / format_bool_static

Function format_bool_static

src/repr/src/strconv.rs:94–99  ·  view source on GitHub ↗

Like `format_bool`, but returns a string with a static lifetime. This function should be preferred to `format_bool` when applicable, as it avoids an allocation.

(b: bool)

Source from the content-addressed store, hash-verified

92/// This function should be preferred to `format_bool` when applicable, as it
93/// avoids an allocation.
94pub fn format_bool_static(b: bool) -> &'static str {
95 match b {
96 true => "t",
97 false => "f",
98 }
99}
100
101/// Writes a boolean value into `buf`.
102///

Callers 2

format_boolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected