diff options
author | Ben S <ogham@bsago.me> | 2015-07-15 21:40:20 +0100 |
---|---|---|
committer | Ben S <ogham@bsago.me> | 2015-08-02 15:28:40 +0100 |
commit | 21ee2fbb30c88dd0394177383ad342aa7c4f0c72 (patch) | |
tree | 239482f558a69c0c04f065cf81a40b6f27e7361c /src/main.rs | |
parent | b6af699bbb241ebc93328a7c5e7f788b44d42e07 (diff) |
Use new slice_splits functions
These replace `init()` and `tail()` which are deprecated in favour of these.
In fact, it's a good thing they're deprecated, because part of the path_prefix code involved working around a call to init() that would panic otherwise - doing the same check with an `Option` is much more ergonomic.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 22af23c..cb357ed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ #![feature(convert, fs_mode)] -#![feature(slice_extras, vec_resize)] +#![feature(slice_splits, vec_resize)] extern crate ansi_term; extern crate datetime; @@ -190,9 +190,9 @@ impl<'dir> Exa<'dir> { #[cfg(not(test))] fn main() { - let args: Vec<String> = env::args().collect(); + let args: Vec<String> = env::args().skip(1).collect(); - match Options::getopts(args.tail()) { + match Options::getopts(&args) { Ok((options, paths)) => { let mut exa = Exa::new(options); exa.load(&paths); |