mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
refactor(logname): simplify the code
This commit is contained in:
parent
332dc5d2f2
commit
851e25d134
1 changed files with 2 additions and 6 deletions
|
@ -39,14 +39,10 @@ static LONG_HELP: &str = "";
|
||||||
pub fn uumain(args: Vec<String>) -> i32 {
|
pub fn uumain(args: Vec<String>) -> i32 {
|
||||||
app!(SYNTAX, SUMMARY, LONG_HELP).parse(args);
|
app!(SYNTAX, SUMMARY, LONG_HELP).parse(args);
|
||||||
|
|
||||||
exec();
|
|
||||||
|
|
||||||
0
|
|
||||||
}
|
|
||||||
|
|
||||||
fn exec() {
|
|
||||||
match get_userlogin() {
|
match get_userlogin() {
|
||||||
Some(userlogin) => println!("{}", userlogin),
|
Some(userlogin) => println!("{}", userlogin),
|
||||||
None => show_error!("no login name"),
|
None => show_error!("no login name"),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue