Why does a File need to be mutable to call Read::read_to_string?
问题 Here's a line from the 2nd edition Rust tutorial: let mut f = File::open(filename).expect("file not found"); I'm of the assumption that the file descriptor is a wrapper around a number that basically doesn't change and is read-only. The compiler complains that the file cannot be borrowed mutably, and I'm assuming it's because the method read_to_string takes the instance as the self argument as mutable, but the question is "why" ? What is ever going to change about the file descriptor? Is it