有时候我很想写***
fn main() {
// Initialize as mutable.
let mut data = String::new();
// ...
data.push_str("data progressively built up");
// ...
// Move to immutable variable.
let data = data; // *** this line.
// From this point on, the data can only be read.
// ...
println!("read: {}", data);
// ...
}
简而言之:我应该写吗?