mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-15 11:36:16 +00:00
Cleanup cat: use slicing syntax.
This commit is contained in:
parent
8a101b2203
commit
7647a37bf8
1 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ use std::io::{IoResult};
|
||||||
use std::ptr::{copy_nonoverlapping_memory};
|
use std::ptr::{copy_nonoverlapping_memory};
|
||||||
|
|
||||||
pub fn uumain(args: Vec<String>) -> isize {
|
pub fn uumain(args: Vec<String>) -> isize {
|
||||||
let program = args[0].as_slice();
|
let program = &args[0];
|
||||||
let opts = [
|
let opts = [
|
||||||
getopts::optflag("A", "show-all", "equivalent to -vET"),
|
getopts::optflag("A", "show-all", "equivalent to -vET"),
|
||||||
getopts::optflag("b", "number-nonblank",
|
getopts::optflag("b", "number-nonblank",
|
||||||
|
@ -48,8 +48,8 @@ pub fn uumain(args: Vec<String>) -> isize {
|
||||||
println!("Usage:");
|
println!("Usage:");
|
||||||
println!(" {0} [OPTION]... [FILE]...", program);
|
println!(" {0} [OPTION]... [FILE]...", program);
|
||||||
println!("");
|
println!("");
|
||||||
print(getopts::usage("Concatenate FILE(s), or standard input, to \
|
print(&getopts::usage("Concatenate FILE(s), or standard input, to \
|
||||||
standard output.", &opts).as_slice());
|
standard output.", &opts)[]);
|
||||||
println!("");
|
println!("");
|
||||||
println!("With no FILE, or when FILE is -, read standard input.");
|
println!("With no FILE, or when FILE is -, read standard input.");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue