diff options
author | Benjamin Sago <ogham@bsago.me> | 2015-04-04 00:14:49 +0200 |
---|---|---|
committer | Benjamin Sago <ogham@bsago.me> | 2015-04-04 00:14:56 +0200 |
commit | f88556814566dbc1c1cde626cb8d5933c6db5b92 (patch) | |
tree | 50ed3fc800e79c0945e0323836d1dcabe3b8658c /src/main.rs | |
parent | 8d066994e75f1c9f30ae6a792e0a399763d74779 (diff) |
Upgrade to latest Rust
Still missing a few Beta features, but it compiles!
- Copy requires Clone
- current_dir returns a Path now
- num_cpus moved to a crate
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 263d5c1..808e9db 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,6 +10,7 @@ extern crate datetime; extern crate getopts; extern crate locale; extern crate natord; +extern crate num_cpus; extern crate number_prefix; extern crate pad; extern crate unicode; @@ -22,7 +23,6 @@ use std::env; use std::old_io::{fs, FileType}; use std::old_path::GenericPath; use std::old_path::posix::Path; -use std::os::num_cpus; use std::sync::mpsc::{channel, sync_channel}; use std::thread; @@ -68,7 +68,7 @@ impl<'a> Exa<'a> { let total_files = files.len(); // Denotes the maxinum number of concurrent threads - let (thread_capacity_tx, thread_capacity_rs) = sync_channel(8 * num_cpus()); + let (thread_capacity_tx, thread_capacity_rs) = sync_channel(8 * num_cpus::get()); // Communication between consumer thread and producer threads enum StatResult<'a> { |