Stdin::read_line: read_line does not need a mutable borrow
This commit is contained in:
@@ -227,7 +227,7 @@ impl Stdin {
|
|||||||
// in which case it will wait for the Enter key to be pressed before
|
// in which case it will wait for the Enter key to be pressed before
|
||||||
/// continuing
|
/// continuing
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[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)
|
self.lock().read_line(buf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user