fn main() { let mut s: String = String::from("hello"); println!("{}", s); s.push_str("bbb"); println!("{}", s); // 这个是不可变的 let s1: &str = "aaa"; println!("{}", s1); let mut s2: String = s1.to_string(); println!("{}", s2); s2.push_str("bbb"); println!("{}", s2); let f = format!("{}-{}-{}", s1, s2, s); println!("{}", f); }