about summary refs log tree commit diff
path: root/src/librustdoc/unindent_pass.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustdoc/unindent_pass.rs')
-rw-r--r--src/librustdoc/unindent_pass.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/unindent_pass.rs b/src/librustdoc/unindent_pass.rs
index ecd72950468..6207e2252e4 100644
--- a/src/librustdoc/unindent_pass.rs
+++ b/src/librustdoc/unindent_pass.rs
@@ -33,7 +33,8 @@ pub fn mk_pass() -> Pass {
 }
 
 fn unindent(s: &str) -> ~str {
-    let lines = str::lines_any(s);
+    let mut lines = ~[];
+    for str::each_line_any(s) |line| { lines.push(line.to_owned()); }
     let mut saw_first_line = false;
     let mut saw_second_line = false;
     let min_indent = do vec::foldl(uint::max_value, lines)