about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorTim Chevalier <chevalier@alum.wellesley.edu>2012-11-24 12:49:31 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2012-11-24 12:52:27 -0800
commitf74fe894fc54ebfeaec03f4df6766489c65fa8c5 (patch)
tree7c3a6d8ba5bdf917742d6c415e8f5dc5b67c8fa6 /src/compiletest
parente454a47bf2272abfad9987a7be876f0563391e3d (diff)
[libstd] getopts, now with fewer copies
Change the opt_ functions in getopts to take a reference to a
Matches, instead of taking a Matches by-value, as suggested in
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/compiletest.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs
index e147ddc3ed7..7ee297f3ffc 100644
--- a/src/compiletest/compiletest.rs
+++ b/src/compiletest/compiletest.rs
@@ -35,12 +35,12 @@ fn parse_config(args: ~[~str]) -> config {
     assert (vec::is_not_empty(args));
     let args_ = vec::tail(args);
     let matches =
-        match getopts::getopts(args_, opts) {
+        &match getopts::getopts(args_, opts) {
           Ok(m) => m,
           Err(f) => fail getopts::fail_str(f)
         };
 
-    fn opt_path(m: getopts::Matches, nm: ~str) -> Path {
+    fn opt_path(m: &getopts::Matches, nm: ~str) -> Path {
         Path(getopts::opt_str(m, nm))
     }