mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #246 from ebfe/remove-to-err-msg
remove use of deprecated to_err_msg
This commit is contained in:
+1
-1
@@ -48,7 +48,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
let matches = match getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(e) => {
|
||||
error!("error: {:s}", e.to_err_msg());
|
||||
error!("error: {}", e);
|
||||
fail!()
|
||||
}
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => crash!(1, "Invalid options\n{}", f.to_err_msg())
|
||||
Err(f) => crash!(1, "Invalid options\n{}", f)
|
||||
};
|
||||
|
||||
if matches.opt_present("help") {
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
];
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => fail!("Invalid options\n{}", f.to_err_msg())
|
||||
Err(f) => fail!("Invalid options\n{}", f)
|
||||
};
|
||||
if matches.opt_present("help") {
|
||||
println!("cat 1.0.0");
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(err) => fail!("{}", err.to_err_msg()),
|
||||
Err(err) => fail!("{}", err),
|
||||
};
|
||||
|
||||
if matches.opt_present("help") {
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(err) => fail!("{}", err.to_err_msg()),
|
||||
Err(err) => fail!("{}", err),
|
||||
};
|
||||
|
||||
if matches.opt_present("version") {
|
||||
|
||||
@@ -42,7 +42,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
let matches = match getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(e) => {
|
||||
error!("error: {:s}", e.to_err_msg());
|
||||
error!("error: {}", e);
|
||||
fail!()
|
||||
},
|
||||
};
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => fail!("Invalid options\n{}", f.to_err_msg())
|
||||
Err(f) => fail!("Invalid options\n{}", f)
|
||||
};
|
||||
|
||||
if matches.opt_present("help") {
|
||||
|
||||
@@ -162,7 +162,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => {
|
||||
show_error!("Invalid options\n{}", f.to_err_msg());
|
||||
show_error!("Invalid options\n{}", f);
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => crash!(1, "Invalid options\n{}", f.to_err_msg())
|
||||
Err(f) => crash!(1, "Invalid options\n{}", f)
|
||||
};
|
||||
|
||||
if matches.opt_present("help") {
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ pub fn uumain(args: Vec<String>) {
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => crash!(1, "Invalid options\n{}", f.to_err_msg())
|
||||
Err(f) => crash!(1, "Invalid options\n{}", f)
|
||||
};
|
||||
|
||||
if matches.opt_present("help") {
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => crash!(1, "{}", f.to_err_msg())
|
||||
Err(f) => crash!(1, "{}", f)
|
||||
};
|
||||
|
||||
if matches.opt_present("h") {
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
let matches = match getopts(args.tail(), options) {
|
||||
Ok(m) => { m },
|
||||
Err(f) => {
|
||||
show_error!("{}", f.to_err_msg());
|
||||
show_error!("{}", f);
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
let matches = match getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(e) => {
|
||||
show_error!("{}\n{}", e.to_err_msg(), get_help_text(NAME, usage.as_slice()));
|
||||
show_error!("{}\n{}", e, get_help_text(NAME, usage.as_slice()));
|
||||
return EXIT_ERR;
|
||||
},
|
||||
};
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
let matches = match getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(e) => {
|
||||
show_error!("{}\n{}", e.to_err_msg(), get_help_text(NAME, usage.as_slice()));
|
||||
show_error!("{}\n{}", e, get_help_text(NAME, usage.as_slice()));
|
||||
return EXIT_ERR;
|
||||
},
|
||||
};
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => crash!(1, "Invalid options\n{}", f.to_err_msg())
|
||||
Err(f) => crash!(1, "Invalid options\n{}", f)
|
||||
};
|
||||
|
||||
if matches.opt_present("help") {
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => crash!(1, "{}", f.to_err_msg())
|
||||
Err(f) => crash!(1, "{}", f)
|
||||
};
|
||||
|
||||
if matches.opt_present("help") {
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => {
|
||||
crash!(1, "Invalid options\n{}", f.to_err_msg());
|
||||
crash!(1, "Invalid options\n{}", f);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
];
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => crash!(1, "{}", f.to_err_msg())
|
||||
Err(f) => crash!(1, "{}", f)
|
||||
};
|
||||
if matches.opt_present("help") {
|
||||
println!("{} {}", NAME, VERSION);
|
||||
|
||||
@@ -37,7 +37,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => {
|
||||
crash!(1, "Invalid options\n{}", f.to_err_msg())
|
||||
crash!(1, "Invalid options\n{}", f)
|
||||
}
|
||||
};
|
||||
if matches.opt_present("help") {
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ pub fn uumain(args: Vec<String>) -> int {
|
||||
let matches = match getopts::getopts(args.tail(), opts) {
|
||||
Ok(m) => m,
|
||||
Err(f) => {
|
||||
crash!(1, "Invalid options\n{}", f.to_err_msg())
|
||||
crash!(1, "Invalid options\n{}", f)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user