mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-09-27 20:59:02 +00:00
Replace deprecated raw types with libc ones
This limits it to stable until the APIs stabilise (weird, huh?)
This commit is contained in:
parent
ee4c09dd30
commit
eaa799c647
@ -5,8 +5,6 @@ before_install:
|
||||
sudo: true
|
||||
language: rust
|
||||
rust:
|
||||
- nightly
|
||||
- beta
|
||||
- stable
|
||||
script:
|
||||
- cargo build --verbose
|
||||
|
42
src/file.rs
42
src/file.rs
@ -17,27 +17,27 @@ use self::fields as f;
|
||||
/// see https://github.com/rust-lang/rust/issues/27712
|
||||
#[allow(dead_code)]
|
||||
mod modes {
|
||||
use std::os::unix::raw;
|
||||
use libc::mode_t;
|
||||
|
||||
pub const USER_READ: raw::mode_t = 0o400;
|
||||
pub const USER_WRITE: raw::mode_t = 0o200;
|
||||
pub const USER_EXECUTE: raw::mode_t = 0o100;
|
||||
pub const USER_RWX: raw::mode_t = 0o700;
|
||||
pub const GROUP_READ: raw::mode_t = 0o040;
|
||||
pub const GROUP_WRITE: raw::mode_t = 0o020;
|
||||
pub const GROUP_EXECUTE: raw::mode_t = 0o010;
|
||||
pub const GROUP_RWX: raw::mode_t = 0o070;
|
||||
pub const OTHER_READ: raw::mode_t = 0o004;
|
||||
pub const OTHER_WRITE: raw::mode_t = 0o002;
|
||||
pub const OTHER_EXECUTE: raw::mode_t = 0o001;
|
||||
pub const OTHER_RWX: raw::mode_t = 0o007;
|
||||
pub const ALL_READ: raw::mode_t = 0o444;
|
||||
pub const ALL_WRITE: raw::mode_t = 0o222;
|
||||
pub const ALL_EXECUTE: raw::mode_t = 0o111;
|
||||
pub const ALL_RWX: raw::mode_t = 0o777;
|
||||
pub const SETUID: raw::mode_t = 0o4000;
|
||||
pub const SETGID: raw::mode_t = 0o2000;
|
||||
pub const STICKY_BIT: raw::mode_t = 0o1000;
|
||||
pub const USER_READ: mode_t = 0o400;
|
||||
pub const USER_WRITE: mode_t = 0o200;
|
||||
pub const USER_EXECUTE: mode_t = 0o100;
|
||||
pub const USER_RWX: mode_t = 0o700;
|
||||
pub const GROUP_READ: mode_t = 0o040;
|
||||
pub const GROUP_WRITE: mode_t = 0o020;
|
||||
pub const GROUP_EXECUTE: mode_t = 0o010;
|
||||
pub const GROUP_RWX: mode_t = 0o070;
|
||||
pub const OTHER_READ: mode_t = 0o004;
|
||||
pub const OTHER_WRITE: mode_t = 0o002;
|
||||
pub const OTHER_EXECUTE: mode_t = 0o001;
|
||||
pub const OTHER_RWX: mode_t = 0o007;
|
||||
pub const ALL_READ: mode_t = 0o444;
|
||||
pub const ALL_WRITE: mode_t = 0o222;
|
||||
pub const ALL_EXECUTE: mode_t = 0o111;
|
||||
pub const ALL_RWX: mode_t = 0o777;
|
||||
pub const SETUID: mode_t = 0o4000;
|
||||
pub const SETGID: mode_t = 0o2000;
|
||||
pub const STICKY_BIT: mode_t = 0o1000;
|
||||
}
|
||||
|
||||
|
||||
@ -432,7 +432,7 @@ fn ext(name: &str) -> Option<String> {
|
||||
/// return an object in this `fields` module. These objects are later rendered
|
||||
/// into formatted strings in the `output/details` module.
|
||||
pub mod fields {
|
||||
use std::os::unix::raw::{blkcnt_t, gid_t, ino_t, nlink_t, time_t, uid_t};
|
||||
use libc::{blkcnt_t, gid_t, ino_t, nlink_t, time_t, uid_t};
|
||||
|
||||
pub enum Type {
|
||||
File, Directory, Pipe, Link, Special,
|
||||
|
Loading…
Reference in New Issue
Block a user