fn change(s: &mut String) {
    if !s.ends_with("s") {
        s.push_str("s");
    }
}
// note that he passed String must also be mutable, not only the reference
note that he passed String must also be mutable, not only the reference
note that he passed String must also be mutable not only the reference
fn change(s: &mut String) {
    if !s.ends_with("s") {
        s.push_str("s");
    }
}
fn change ( s : & mut String ) { if ! s . ends_with ( " " ) { s . push_str ( " " ) ; } }
note that he passed String must also be mutable, not only the reference
note that he passed String must also be mutable not only the reference
s
&mut String
s
&mut String