Skip to content

Commit 24f21f2

Browse files
committed
Stdin::read_line: read_line does not need a mutable borrow
1 parent 50df2a0 commit 24f21f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/io/stdio.rs

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

0 commit comments

Comments
 (0)