Fix warnings in pidigits benchmark

This commit is contained in:
Darin Morrison 2015-03-17 22:22:06 -06:00
parent 8ea4c031dd
commit 2ef6c1057c
1 changed files with 5 additions and 2 deletions

View File

@ -38,6 +38,9 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE. // OF THE POSSIBILITY OF SUCH DAMAGE.
#![feature(core)]
#![feature(test)]
extern crate num; extern crate num;
extern crate test; extern crate test;
@ -124,9 +127,9 @@ fn use_bencher(b: &mut Bencher) {
b.iter(|| pidigits(DEFAULT_DIGITS)) b.iter(|| pidigits(DEFAULT_DIGITS))
} }
#[allow(dead_code)]
fn main() { fn main() {
let args = std::os::args(); let args = std::env::args().collect::<Vec<_>>();
let args = args.as_slice();
let n = if args.len() < 2 { let n = if args.len() < 2 {
DEFAULT_DIGITS DEFAULT_DIGITS
} else { } else {