about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2016-03-19 23:37:13 -0400
committerCorey Farwell <coreyf@rwell.org>2016-03-20 00:04:59 -0400
commit4238d0b639d4ead97d9cf4ffbb049c0573239cac (patch)
tree71460bb6053dca61a042be38456f265ae7107866 /src
parent151be09333b53a761c847107bc659769632ae6c6 (diff)
downloadrust-4238d0b639d4ead97d9cf4ffbb049c0573239cac.tar.gz
rust-4238d0b639d4ead97d9cf4ffbb049c0573239cac.zip
Replace unneeded owned `Vec` usage with `slice`.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_driver/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 357c7238c1f..d4f164b6e24 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -157,7 +157,7 @@ pub fn run_compiler<'a>(args: &[String],
         }
     }}
 
-    let matches = match handle_options(args.to_vec()) {
+    let matches = match handle_options(args) {
         Some(matches) => matches,
         None => return (Ok(()), None),
     };
@@ -870,9 +870,9 @@ fn print_flag_list<T>(cmdline_opt: &str,
 ///
 /// So with all that in mind, the comments below have some more detail about the
 /// contortions done here to get things to work out correctly.
-pub fn handle_options(mut args: Vec<String>) -> Option<getopts::Matches> {
+pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
     // Throw away the first argument, the name of the binary
-    let _binary = args.remove(0);
+    let args = &args[1..];
 
     if args.is_empty() {
         // user did not write `-v` nor `-Z unstable-options`, so do not