I checked the rust documentation on interior mutability. But I find it hard to understand.
interior mutability is when you have an immutable reference (&T) but you can mutate the destination,
I was going through a piece of rust code, and I found the following:
let mut sout = BufWriter::new(stdout()); let mut bout = sout.into_inner()?; bout.flush()?;
Why do you require sout.into_inner() before calling flush()? sout has already been declared to be mutable.