1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

uucore_procs+uu: specify uucore::show_error

This allows crates to use `#[uucore_procs::gen_uumain]` without `use uucore::show_error` or

    #[macro_use]
    extern crate uucore;

Removed unecessary usage
This commit is contained in:
Thomas Queiroz 2021-10-03 23:57:33 -03:00
parent 368fa54520
commit 00c9710206
No known key found for this signature in database
GPG key ID: 229D2DDF7ECA5F8F
23 changed files with 1 additions and 60 deletions

View file

@ -6,9 +6,6 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
#[macro_use]
extern crate uucore;
use platform_info::*;
use clap::{crate_version, App};

View file

@ -5,9 +5,6 @@
// For the full copyright and license information, please view the LICENSE file
// that was distributed with this source code.
#[macro_use]
extern crate uucore;
use std::io::{stdin, Read};
use clap::App;

View file

@ -6,9 +6,6 @@
// For the full copyright and license information, please view the LICENSE file
// that was distributed with this source code.
#[macro_use]
extern crate uucore;
use uu_base32::base_common;
pub use uu_base32::uu_app;

View file

@ -8,9 +8,6 @@
//spell-checker:ignore (args) lsbf msbf
#[macro_use]
extern crate uucore;
use clap::{App, Arg};
use uu_base32::base_common::{self, Config, BASE_CMD_PARSE_ERROR};

View file

@ -12,8 +12,6 @@
#[cfg(unix)]
extern crate unix_socket;
#[macro_use]
extern crate uucore;
// last synced with: cat (GNU coreutils) 8.13
use clap::{crate_version, App, Arg};

View file

@ -7,8 +7,6 @@
// spell-checker:ignore (ToDO) COMFOLLOW Chowner RFILE RFILE's derefer dgid nonblank nonprint nonprinting
#[macro_use]
extern crate uucore;
use uucore::display::Quotable;
pub use uucore::entries;
use uucore::error::{FromIo, UResult, USimpleError};

View file

@ -7,8 +7,6 @@
// spell-checker:ignore (ToDO) COMFOLLOW Passwd RFILE RFILE's derefer dgid duid groupname
#[macro_use]
extern crate uucore;
use uucore::display::Quotable;
pub use uucore::entries::{self, Group, Locate, Passwd};
use uucore::perms::{chown_base, options, IfFrom};

View file

@ -6,8 +6,6 @@
// For the full copyright and license information, please view the LICENSE file
// that was distributed with this source code.
#[macro_use]
extern crate uucore;
use uucore::error::UError;
use uucore::error::UResult;
#[cfg(unix)]

View file

@ -5,9 +5,6 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
#[macro_use]
extern crate uucore;
use clap::{crate_version, App, Arg};
use std::path::Path;
use uucore::display::print_verbatim;

View file

@ -6,9 +6,6 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
#[macro_use]
extern crate uucore;
use clap::{crate_version, App, Arg};
use std::io::{self, Write};
use std::iter::Peekable;

View file

@ -5,9 +5,6 @@
//* For the full copyright and license information, please view the LICENSE
//* file that was distributed with this source code.
#[macro_use]
extern crate uucore;
use clap::{crate_version, App, Arg};
use uucore::error::{UResult, USimpleError};
use uucore::InvalidEncodingHandling;

View file

@ -5,9 +5,6 @@
// * For the full copyright and license information, please view the LICENSE
// * file that was distributed with this source code.
#[macro_use]
extern crate uucore;
use clap::App;
use uucore::error::UResult;

View file

@ -7,9 +7,6 @@
// spell-checker:ignore (ToDO) gethostid
#[macro_use]
extern crate uucore;
use clap::{crate_version, App};
use libc::c_long;
use uucore::error::UResult;

View file

@ -7,9 +7,6 @@
// spell-checker:ignore (ToDO) MAKEWORD addrs hashset
#[macro_use]
extern crate uucore;
use std::collections::hash_set::HashSet;
use std::net::ToSocketAddrs;
use std::str;

View file

@ -8,9 +8,6 @@
// spell-checker:ignore (paths) GPGHome
#[macro_use]
extern crate uucore;
use clap::{crate_version, App, Arg};
use uucore::display::{println_verbatim, Quotable};
use uucore::error::{FromIo, UError, UResult};

View file

@ -5,9 +5,6 @@
// * For the full copyright and license information, please view the LICENSE
// * file that was distributed with this source code.
#[macro_use]
extern crate uucore;
use clap::{crate_version, App, Arg};
use std::env;
use std::io;

View file

@ -5,9 +5,6 @@
// * For the full copyright and license information, please view the LICENSE
// * file that was distributed with this source code.
#[macro_use]
extern crate uucore;
use std::thread;
use std::time::Duration;

View file

@ -5,9 +5,6 @@
// * For the full copyright and license information, please view the LICENSE
// * file that was distributed with this source code.
#[macro_use]
extern crate uucore;
use clap::App;
use uucore::error::UResult;

View file

@ -7,9 +7,6 @@
/* last synced with: unlink (GNU coreutils) 8.21 */
#[macro_use]
extern crate uucore;
use std::fs::remove_file;
use std::path::Path;

View file

@ -11,8 +11,6 @@
use chrono::{Local, TimeZone, Utc};
use clap::{crate_version, App, Arg};
#[macro_use]
extern crate uucore;
// import crate time from utmpx
pub use uucore::libc;
use uucore::libc::time_t;

View file

@ -9,8 +9,6 @@
#[macro_use]
extern crate clap;
#[macro_use]
extern crate uucore;
use clap::App;

View file

@ -12,8 +12,6 @@ use std::io::{self, Write};
#[macro_use]
extern crate clap;
#[macro_use]
extern crate uucore;
use clap::{App, Arg};
use uucore::error::{UResult, USimpleError};

View file

@ -101,7 +101,7 @@ pub fn gen_uumain(_args: TokenStream, stream: TokenStream) -> TokenStream {
Err(e) => {
let s = format!("{}", e);
if s != "" {
show_error!("{}", s);
uucore::show_error!("{}", s);
}
if e.usage() {
eprintln!("Try '{} --help' for more information.", uucore::execution_phrase());