about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/fileinput.rs8
-rw-r--r--src/libstd/test.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/fileinput.rs b/src/libstd/fileinput.rs
index 4e205b50014..c3622fad53b 100644
--- a/src/libstd/fileinput.rs
+++ b/src/libstd/fileinput.rs
@@ -389,7 +389,7 @@ Fails when attempting to read from a file that can't be opened.
 */
 #[cfg(not(stage0))]
 pub fn input(f: &fn(&str) -> bool) -> bool {
-    let mut i = FileInput::from_args();
+    let i = FileInput::from_args();
     i.each_line(f)
 }
 
@@ -413,7 +413,7 @@ Fails when attempting to read from a file that can't be opened.
 */
 #[cfg(not(stage0))]
 pub fn input_state(f: &fn(&str, FileInputState) -> bool) -> bool {
-    let mut i = FileInput::from_args();
+    let i = FileInput::from_args();
     i.each_line_state(f)
 }
 
@@ -433,7 +433,7 @@ Fails when attempting to read from a file that can't be opened.
 */
 #[cfg(not(stage0))]
 pub fn input_vec(files: ~[Option<Path>], f: &fn(&str) -> bool) -> bool {
-    let mut i = FileInput::from_vec(files);
+    let i = FileInput::from_vec(files);
     i.each_line(f)
 }
 
@@ -457,7 +457,7 @@ Fails when attempting to read from a file that can't be opened.
 #[cfg(not(stage0))]
 pub fn input_vec_state(files: ~[Option<Path>],
                        f: &fn(&str, FileInputState) -> bool) -> bool {
-    let mut i = FileInput::from_vec(files);
+    let i = FileInput::from_vec(files);
     i.each_line_state(f)
 }
 
diff --git a/src/libstd/test.rs b/src/libstd/test.rs
index bb90b783444..71cbc0d7a6a 100644
--- a/src/libstd/test.rs
+++ b/src/libstd/test.rs
@@ -412,7 +412,7 @@ fn run_tests(opts: &TestOpts,
              callback: @fn(e: TestEvent)) {
 
     let filtered_tests = filter_tests(opts, tests);
-    let filtered_descs = filtered_tests.map(|t| t.desc);
+    let filtered_descs = filtered_tests.map(|t| copy t.desc);
 
     callback(TeFiltered(filtered_descs));