Closed
Description
Currently, Stdin::read_line
takes self
as &mut
. Why is that? The implementation simply locks and calls read_line
on the guard, and locking doesn't need a mutable self
. So this is unnecessary, and the doc doesn't say why this was done. (Nor does the source.)
So I propose for this to be changed to &self
. Looks like an oversight of some refactoring to me.