From f74fe894fc54ebfeaec03f4df6766489c65fa8c5 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Sat, 24 Nov 2012 12:49:31 -0800 Subject: [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 --- src/libstd/test.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstd/test.rs') diff --git a/src/libstd/test.rs b/src/libstd/test.rs index 54f011d246c..fb3e057392d 100644 --- a/src/libstd/test.rs +++ b/src/libstd/test.rs @@ -73,8 +73,8 @@ fn parse_opts(args: &[~str]) -> OptRes { option::Some(matches.free[0]) } else { option::None }; - let run_ignored = getopts::opt_present(matches, ~"ignored"); - let logfile = getopts::opt_maybe_str(matches, ~"logfile"); + let run_ignored = getopts::opt_present(&matches, ~"ignored"); + let logfile = getopts::opt_maybe_str(&matches, ~"logfile"); let test_opts = {filter: filter, run_ignored: run_ignored, logfile: logfile}; -- cgit 1.4.1-3-g733a5