]> git.lizzy.rs Git - rust.git/commitdiff
Stdin::read_line: read_line does not need a mutable borrow
authorRalf Jung <post@ralfj.de>
Wed, 8 Jul 2015 19:53:45 +0000 (21:53 +0200)
committerRalf Jung <post@ralfj.de>
Wed, 8 Jul 2015 19:53:45 +0000 (21:53 +0200)
src/libstd/io/stdio.rs

index 2a64d0f6e8c19ea8d96faf3f482ff7ada0a9d19f..dc82377f2af8c7e0a4d93ec0111e837abf7a2c6b 100644 (file)
@@ -227,7 +227,7 @@ pub fn lock(&self) -> StdinLock {
     //    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)
     }
 }