mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 04:27:45 +00:00
Update for latest Rust
This commit is contained in:
parent
7d353ce86b
commit
01c681ecb3
11 changed files with 13 additions and 4 deletions
|
@ -15,6 +15,7 @@ extern crate libc;
|
|||
use getopts::{optflag, optopt, getopts, usage};
|
||||
use c_types::{get_pw_from_args, get_group};
|
||||
use libc::funcs::posix88::unistd::{execvp, setuid, setgid};
|
||||
use std::io::fs::PathExtensions;
|
||||
|
||||
#[path = "../common/util.rs"] mod util;
|
||||
#[path = "../common/c_types.rs"] mod c_types;
|
||||
|
|
|
@ -15,6 +15,7 @@ extern crate getopts;
|
|||
extern crate libc;
|
||||
|
||||
use std::io::{stdio, File, BufferedWriter, BufferedReader, print};
|
||||
use std::io::fs::PathExtensions;
|
||||
use getopts::{optopt, optflag, getopts, usage};
|
||||
|
||||
use ranges::Range;
|
||||
|
|
|
@ -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.
|
||||
// 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
|
||||
if break_before {
|
||||
write_newline(args.indent_str, args.ostream);
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
extern crate getopts;
|
||||
extern crate libc;
|
||||
|
||||
use std::io::fs;
|
||||
use std::io::fs::{mod, PathExtensions};
|
||||
use std::io::FilePermission;
|
||||
use std::num::strconv;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ extern crate getopts;
|
|||
extern crate libc;
|
||||
|
||||
use std::io::{print, stdin, stdio, fs, BufferedReader};
|
||||
use std::io::fs::PathExtensions;
|
||||
|
||||
#[path = "../common/util.rs"]
|
||||
mod util;
|
||||
|
|
|
@ -15,6 +15,7 @@ extern crate getopts;
|
|||
extern crate libc;
|
||||
|
||||
use std::io::{print, fs};
|
||||
use std::io::fs::PathExtensions;
|
||||
|
||||
#[path = "../common/util.rs"]
|
||||
mod util;
|
||||
|
|
|
@ -14,6 +14,7 @@ extern crate getopts;
|
|||
extern crate time;
|
||||
|
||||
use std::io::File;
|
||||
use std::io::fs::PathExtensions;
|
||||
|
||||
#[path = "../common/util.rs"]
|
||||
mod util;
|
||||
|
|
|
@ -15,6 +15,7 @@ extern crate getopts;
|
|||
extern crate libc;
|
||||
|
||||
use std::io::{File, Open, ReadWrite, fs};
|
||||
use std::io::fs::PathExtensions;
|
||||
use std::u64;
|
||||
|
||||
#[path = "../common/util.rs"]
|
||||
|
|
|
@ -17,7 +17,7 @@ extern crate getopts;
|
|||
extern crate libc;
|
||||
|
||||
use std::io;
|
||||
use std::io::fs;
|
||||
use std::io::fs::{mod, PathExtensions};
|
||||
use std::io::print;
|
||||
|
||||
#[path = "../common/util.rs"]
|
||||
|
|
|
@ -16,6 +16,7 @@ extern crate libc;
|
|||
|
||||
use std::str::from_utf8;
|
||||
use std::io::{print, File, BufferedReader};
|
||||
use std::io::fs::PathExtensions;
|
||||
use std::io::stdio::stdin_raw;
|
||||
use std::result::Result as StdResult;
|
||||
use getopts::Matches;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use std::io::process::Command;
|
||||
use std::io::fs::rmdir;
|
||||
use std::io::fs::{rmdir, PathExtensions};
|
||||
|
||||
static exe: &'static str = "./mkdir";
|
||||
static test_dir1: &'static str = "mkdir_test1";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue