Stdin::read_line: read_line does not need a mutable borrow

This commit is contained in:
Ralf Jung
2015-07-08 21:53:45 +02:00
parent 50df2a09b8
commit 24f21f22c1

View File

@@ -227,7 +227,7 @@ impl Stdin {
// in which case it will wait for the Enter key to be pressed before
/// continuing
#[stable(feature = "rust1", since = "1.0.0")]
pub fn read_line(&mut self, buf: &mut String) -> io::Result<usize> {
pub fn read_line(&self, buf: &mut String) -> io::Result<usize> {
self.lock().read_line(buf)
}
}