fn boolean_to_string(b: bool) -> String {
    if b == true {
        String::from("true")
    } else {
        String::from("false")
    }
}
// Can't just return "true" string literal
// this is because string literals represent a reference
// we need to return a new string
Can't just return "true" string literal
this is because string literals represent a reference
we need to return a new string
Can ' t just return " true " string literal this is because string literals represent a reference we need to return a new string
fn boolean_to_string(b: bool) -> String {
    if b == true {
        String::from("true")
    } else {
        String::from("false")
    }
}
fn boolean_to_string ( b : bool ) -> String { if b == true { String :: from ( " " ) } else { String :: from ( " " ) } }
Can't just return "true" string literal
this is because string literals represent a reference
we need to return a new string
Can ' t just return " true " string literal this is because string literals represent a reference we need to return a new string
b
bool
b
bool