fn boolean_to_string(b: bool) -> String { ["false", "true"][b as usize].to_string() } // Note how the array (the first []) is indexed (the second []).