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)
| 92 | /// This function should be preferred to `format_bool` when applicable, as it |
| 93 | /// avoids an allocation. |
| 94 | pub 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 | /// |
no outgoing calls
no test coverage detected