diff options
Diffstat (limited to 'src/libstd/io.rs')
| -rw-r--r-- | src/libstd/io.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/io.rs b/src/libstd/io.rs index e3977ca0067..8ec3a4cdd81 100644 --- a/src/libstd/io.rs +++ b/src/libstd/io.rs @@ -748,7 +748,7 @@ impl<T:Reader> ReaderUtil for T { if self.eof() && line.is_empty() { break; } // trim the \n, so that each_line is consistent with read_line - let n = str::len(line); + let n = line.len(); if line[n-1] == '\n' as u8 { unsafe { str::raw::set_len(&mut line, n-1); } } |
