From 24f21f22c10031a55c9b17f05782b57ccad62433 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 8 Jul 2015 21:53:45 +0200 Subject: [PATCH] Stdin::read_line: read_line does not need a mutable borrow --- src/libstd/io/stdio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 2a64d0f6e8c19..dc82377f2af8c 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -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 { + pub fn read_line(&self, buf: &mut String) -> io::Result { self.lock().read_line(buf) } }