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

head, tail, uutils: fix build

This commit is contained in:
Michael Gehring 2014-11-02 16:56:00 +01:00
parent 4f311e3c60
commit 476bdcd9d2
3 changed files with 5 additions and 6 deletions

View file

@ -16,7 +16,7 @@ extern crate getopts;
use std::char; use std::char;
use std::io::{stdin}; use std::io::{stdin};
use std::io::BufferedReader; use std::io::{BufferedReader, BytesReader};
use std::io::fs::File; use std::io::fs::File;
use std::path::Path; use std::path::Path;
use std::str::from_utf8; use std::str::from_utf8;

View file

@ -15,12 +15,11 @@ extern crate getopts;
use std::char; use std::char;
use std::io::{stdin}; use std::io::{stdin};
use std::io::BufferedReader; use std::io::{BufferedReader, BytesReader};
use std::io::fs::File; use std::io::fs::File;
use std::path::Path; use std::path::Path;
use std::str::from_utf8; use std::str::from_utf8;
use getopts::{optopt, optflag, getopts, usage}; use getopts::{optopt, optflag, getopts, usage};
use std::collections::Deque;
use std::collections::ringbuf::RingBuf; use std::collections::ringbuf::RingBuf;
use std::io::timer::sleep; use std::io::timer::sleep;
use std::time::duration::Duration; use std::time::duration::Duration;

View file

@ -46,7 +46,7 @@ fn main() {
let binary = Path::new(args[0].as_slice()); let binary = Path::new(args[0].as_slice());
let binary_as_util = binary.filename_str().unwrap(); let binary_as_util = binary.filename_str().unwrap();
match umap.find_equiv(&binary_as_util) { match umap.find_equiv(binary_as_util) {
Some(&uumain) => { Some(&uumain) => {
os::set_exit_status(uumain(args)); os::set_exit_status(uumain(args));
return return
@ -70,7 +70,7 @@ fn main() {
args.remove(0); args.remove(0);
let util = args[0].as_slice(); let util = args[0].as_slice();
match umap.find_equiv(&util) { match umap.find_equiv(util) {
Some(&uumain) => { Some(&uumain) => {
os::set_exit_status(uumain(args.clone())); os::set_exit_status(uumain(args.clone()));
return return
@ -80,7 +80,7 @@ fn main() {
// see if they want help on a specific util // see if they want help on a specific util
if args.len() >= 2 { if args.len() >= 2 {
let util = args[1].as_slice(); let util = args[1].as_slice();
match umap.find_equiv(&util) { match umap.find_equiv(util) {
Some(&uumain) => { Some(&uumain) => {
os::set_exit_status(uumain(vec![util.to_string(), "--help".to_string()])); os::set_exit_status(uumain(vec![util.to_string(), "--help".to_string()]));
return return