1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-31 13:07:46 +00:00

Update for latest Rust

This commit is contained in:
Arcterus 2014-09-16 18:50:38 -07:00
parent 7d353ce86b
commit 01c681ecb3
11 changed files with 13 additions and 4 deletions

View file

@ -15,6 +15,7 @@ extern crate libc;
use getopts::{optflag, optopt, getopts, usage}; use getopts::{optflag, optopt, getopts, usage};
use c_types::{get_pw_from_args, get_group}; use c_types::{get_pw_from_args, get_group};
use libc::funcs::posix88::unistd::{execvp, setuid, setgid}; use libc::funcs::posix88::unistd::{execvp, setuid, setgid};
use std::io::fs::PathExtensions;
#[path = "../common/util.rs"] mod util; #[path = "../common/util.rs"] mod util;
#[path = "../common/c_types.rs"] mod c_types; #[path = "../common/c_types.rs"] mod c_types;

View file

@ -15,6 +15,7 @@ extern crate getopts;
extern crate libc; extern crate libc;
use std::io::{stdio, File, BufferedWriter, BufferedReader, print}; use std::io::{stdio, File, BufferedWriter, BufferedReader, print};
use std::io::fs::PathExtensions;
use getopts::{optopt, optflag, getopts, usage}; use getopts::{optopt, optflag, getopts, usage};
use ranges::Range; use ranges::Range;

View file

@ -139,7 +139,9 @@ fn break_knuth_plass<'a, T: Clone + Iterator<&'a WordInfo<'a>>>(mut iter: T, arg
// We find identical breakpoints here by comparing addresses of the references. // We find identical breakpoints here by comparing addresses of the references.
// This is OK because the backing vector is not mutating once we are linebreaking. // This is OK because the backing vector is not mutating once we are linebreaking.
if winfo as *const _ == next_break as *const _ { let winfo_ptr = winfo as *const _;
let next_break_ptr = next_break as *const _;
if winfo_ptr == next_break_ptr {
// OK, we found the matching word // OK, we found the matching word
if break_before { if break_before {
write_newline(args.indent_str, args.ostream); write_newline(args.indent_str, args.ostream);

View file

@ -14,7 +14,7 @@
extern crate getopts; extern crate getopts;
extern crate libc; extern crate libc;
use std::io::fs; use std::io::fs::{mod, PathExtensions};
use std::io::FilePermission; use std::io::FilePermission;
use std::num::strconv; use std::num::strconv;

View file

@ -15,6 +15,7 @@ extern crate getopts;
extern crate libc; extern crate libc;
use std::io::{print, stdin, stdio, fs, BufferedReader}; use std::io::{print, stdin, stdio, fs, BufferedReader};
use std::io::fs::PathExtensions;
#[path = "../common/util.rs"] #[path = "../common/util.rs"]
mod util; mod util;

View file

@ -15,6 +15,7 @@ extern crate getopts;
extern crate libc; extern crate libc;
use std::io::{print, fs}; use std::io::{print, fs};
use std::io::fs::PathExtensions;
#[path = "../common/util.rs"] #[path = "../common/util.rs"]
mod util; mod util;

View file

@ -14,6 +14,7 @@ extern crate getopts;
extern crate time; extern crate time;
use std::io::File; use std::io::File;
use std::io::fs::PathExtensions;
#[path = "../common/util.rs"] #[path = "../common/util.rs"]
mod util; mod util;

View file

@ -15,6 +15,7 @@ extern crate getopts;
extern crate libc; extern crate libc;
use std::io::{File, Open, ReadWrite, fs}; use std::io::{File, Open, ReadWrite, fs};
use std::io::fs::PathExtensions;
use std::u64; use std::u64;
#[path = "../common/util.rs"] #[path = "../common/util.rs"]

View file

@ -17,7 +17,7 @@ extern crate getopts;
extern crate libc; extern crate libc;
use std::io; use std::io;
use std::io::fs; use std::io::fs::{mod, PathExtensions};
use std::io::print; use std::io::print;
#[path = "../common/util.rs"] #[path = "../common/util.rs"]

View file

@ -16,6 +16,7 @@ extern crate libc;
use std::str::from_utf8; use std::str::from_utf8;
use std::io::{print, File, BufferedReader}; use std::io::{print, File, BufferedReader};
use std::io::fs::PathExtensions;
use std::io::stdio::stdin_raw; use std::io::stdio::stdin_raw;
use std::result::Result as StdResult; use std::result::Result as StdResult;
use getopts::Matches; use getopts::Matches;

View file

@ -1,5 +1,5 @@
use std::io::process::Command; use std::io::process::Command;
use std::io::fs::rmdir; use std::io::fs::{rmdir, PathExtensions};
static exe: &'static str = "./mkdir"; static exe: &'static str = "./mkdir";
static test_dir1: &'static str = "mkdir_test1"; static test_dir1: &'static str = "mkdir_test1";