mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
logname: fix test & style warning
This commit is contained in:
parent
41eb930292
commit
34b9809223
1 changed files with 3 additions and 4 deletions
|
@ -37,21 +37,20 @@ static SUMMARY: &str = "Print user's login name";
|
|||
static VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
fn get_usage() -> String {
|
||||
format!("{0}", executable!())
|
||||
String::from(executable!())
|
||||
}
|
||||
|
||||
pub fn uumain(args: impl uucore::Args) -> i32 {
|
||||
let _ = args
|
||||
let args = args
|
||||
.collect_str(InvalidEncodingHandling::Ignore)
|
||||
.accept_any();
|
||||
|
||||
let usage = get_usage();
|
||||
|
||||
let _ = App::new(executable!())
|
||||
.version(VERSION)
|
||||
.about(SUMMARY)
|
||||
.usage(&usage[..])
|
||||
.get_matches();
|
||||
.get_matches_from(args);
|
||||
|
||||
match get_userlogin() {
|
||||
Some(userlogin) => println!("{}", userlogin),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue