You can always just make it immutable afterward:
let mut s = String::new();
io::stdin().read_line(&mut s);
let s = s; // now immutable
You can always just make it immutable afterward:
let mut s = String::new();
io::stdin().read_line(&mut s);
let s = s; // now immutable