mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-26 22:06:26 +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 = [
|
dependencies = [
|
||||||
"ansi_term 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"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)",
|
"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]]
|
[[package]]
|
||||||
name = "datetime"
|
name = "datetime"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"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)",
|
||||||
"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)",
|
||||||
"regex 0.1.20 (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)",
|
"regex_macros 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
@ -105,7 +105,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "locale"
|
name = "locale"
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -141,7 +141,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pad"
|
name = "pad"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
use std::old_io::{fs, IoResult};
|
use std::old_io::{fs, IoResult};
|
||||||
|
use std::old_path::GenericPath;
|
||||||
|
use std::old_path::posix::Path;
|
||||||
use file::{File, GREY};
|
use file::{File, GREY};
|
||||||
|
|
||||||
#[cfg(feature="git")] use ansi_term::{ANSIString, ANSIStrings};
|
#[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::{fs, IoResult};
|
||||||
use std::old_io as io;
|
use std::old_io as io;
|
||||||
|
use std::old_path::GenericPath;
|
||||||
|
use std::old_path::posix::Path;
|
||||||
use std::ascii::AsciiExt;
|
use std::ascii::AsciiExt;
|
||||||
use std::os::getcwd;
|
use std::os::getcwd;
|
||||||
|
|
||||||
@ -494,6 +502,8 @@ pub mod test {
|
|||||||
|
|
||||||
pub use column::{Cell, Column};
|
pub use column::{Cell, Column};
|
||||||
pub use std::old_io as io;
|
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 output::details::UserLocale;
|
||||||
|
|
||||||
pub use users::{User, Group};
|
pub use users::{User, Group};
|
||||||
|
@ -19,6 +19,8 @@ extern crate git2;
|
|||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::old_io::{fs, FileType};
|
use std::old_io::{fs, FileType};
|
||||||
|
use std::old_path::GenericPath;
|
||||||
|
use std::old_path::posix::Path;
|
||||||
use std::os::num_cpus;
|
use std::os::num_cpus;
|
||||||
use std::sync::mpsc::{channel, sync_channel};
|
use std::sync::mpsc::{channel, sync_channel};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
@ -170,7 +170,7 @@ impl Table {
|
|||||||
// Work out the list of column widths by finding the longest cell for
|
// 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
|
// each column, then formatting each cell in that column to be the
|
||||||
// width of that one.
|
// 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))
|
.map(|n| self.rows.iter().map(|row| row.cells[n].length).max().unwrap_or(0))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@ use std::ffi::CString;
|
|||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::old_io as io;
|
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};
|
use self::libc::{c_int, size_t, ssize_t, c_char, c_void, uint32_t};
|
||||||
|
|
||||||
/// Don't follow symbolic links
|
/// Don't follow symbolic links
|
||||||
|
@ -4,6 +4,8 @@ extern crate libc;
|
|||||||
use std::ffi::CString;
|
use std::ffi::CString;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::old_io as io;
|
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};
|
use self::libc::{size_t, ssize_t, c_char, c_void};
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
Loading…
Reference in New Issue
Block a user