From 8139cfedea243e26ad0161d4b48c831f0055faee Mon Sep 17 00:00:00 2001 From: Ben S Date: Thu, 26 Feb 2015 07:42:37 +0000 Subject: [PATCH] Fewer warnings when testing --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ec09887..2624130 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -#![feature(collections, core, env, libc, old_io, old_path, std_misc)] +#![feature(collections, core, env, io, libc, old_io, old_path, std_misc)] // Other platforms than macos don't need std_misc but you can't // use #[cfg] on features. @@ -33,6 +33,7 @@ pub mod output; pub mod term; pub mod xattr; +#[cfg(not(test))] struct Exa<'a> { count: usize, options: Options, @@ -40,6 +41,7 @@ struct Exa<'a> { files: Vec>, } +#[cfg(not(test))] impl<'a> Exa<'a> { fn new(options: Options) -> Exa<'a> { Exa { @@ -145,6 +147,7 @@ impl<'a> Exa<'a> { } } +#[cfg(not(test))] fn main() { let args: Vec = env::args().collect();