mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-23 04:22:06 +00:00
Upgrade to latest Rust
- old_path::Path isn't imported by default anymore - range -> ..
This commit is contained in:
parent
1986c504ba
commit
9c2858e447
16
Cargo.lock
generated
16
Cargo.lock
generated
@ -4,13 +4,13 @@ version = "0.2.0"
|
||||
dependencies = [
|
||||
"ansi_term 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"datetime 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"datetime 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"git2 0.2.5 (git+https://github.com/alexcrichton/git2-rs.git)",
|
||||
"locale 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"locale 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"natord 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"number_prefix 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pad 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pad 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"users 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -26,11 +26,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "datetime"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"locale 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pad 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"locale 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pad 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex_macros 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
@ -105,7 +105,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "locale"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
@ -141,7 +141,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pad"
|
||||
version = "0.1.2"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
|
@ -1,4 +1,6 @@
|
||||
use std::old_io::{fs, IoResult};
|
||||
use std::old_path::GenericPath;
|
||||
use std::old_path::posix::Path;
|
||||
use file::{File, GREY};
|
||||
|
||||
#[cfg(feature="git")] use ansi_term::{ANSIString, ANSIStrings};
|
||||
|
10
src/file.rs
10
src/file.rs
@ -1,5 +1,13 @@
|
||||
// Yeah, we still have to use the old path and IO libraries, until they sprout
|
||||
// the ability to inspect file types and stat times and other such things.
|
||||
//
|
||||
// There's a tracking issue for it:
|
||||
// https://github.com/rust-lang/rfcs/issues/939
|
||||
|
||||
use std::old_io::{fs, IoResult};
|
||||
use std::old_io as io;
|
||||
use std::old_path::GenericPath;
|
||||
use std::old_path::posix::Path;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::os::getcwd;
|
||||
|
||||
@ -494,6 +502,8 @@ pub mod test {
|
||||
|
||||
pub use column::{Cell, Column};
|
||||
pub use std::old_io as io;
|
||||
pub use std::old_path::GenericPath;
|
||||
pub use std::old_path::posix::Path;
|
||||
pub use output::details::UserLocale;
|
||||
|
||||
pub use users::{User, Group};
|
||||
|
@ -19,6 +19,8 @@ extern crate git2;
|
||||
|
||||
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;
|
||||
|
@ -170,7 +170,7 @@ impl Table {
|
||||
// Work out the list of column widths by finding the longest cell for
|
||||
// each column, then formatting each cell in that column to be the
|
||||
// width of that one.
|
||||
let column_widths: Vec<usize> = range(0, self.columns.len())
|
||||
let column_widths: Vec<usize> = (0 .. self.columns.len())
|
||||
.map(|n| self.rows.iter().map(|row| row.cells[n].length).max().unwrap_or(0))
|
||||
.collect();
|
||||
|
||||
|
@ -5,6 +5,8 @@ use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use std::mem;
|
||||
use std::old_io as io;
|
||||
use std::old_path::GenericPath;
|
||||
use std::old_path::posix::Path;
|
||||
use self::libc::{c_int, size_t, ssize_t, c_char, c_void, uint32_t};
|
||||
|
||||
/// Don't follow symbolic links
|
||||
|
@ -4,6 +4,8 @@ extern crate libc;
|
||||
use std::ffi::CString;
|
||||
use std::ptr;
|
||||
use std::old_io as io;
|
||||
use std::old_path::GenericPath;
|
||||
use std::old_path::posix::Path;
|
||||
use self::libc::{size_t, ssize_t, c_char, c_void};
|
||||
|
||||
extern "C" {
|
||||
|
Loading…
Reference in New Issue
Block a user