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

users: use UResult

This commit is contained in:
Thomas Queiroz 2021-10-04 00:04:33 -03:00
parent 00c9710206
commit e2fa6f9412
No known key found for this signature in database
GPG key ID: 229D2DDF7ECA5F8F

View file

@ -11,6 +11,7 @@
use std::path::Path; use std::path::Path;
use clap::{crate_version, App, Arg}; use clap::{crate_version, App, Arg};
use uucore::error::UResult;
use uucore::utmpx::{self, Utmpx}; use uucore::utmpx::{self, Utmpx};
static ABOUT: &str = "Print the user names of users currently logged in to the current host"; static ABOUT: &str = "Print the user names of users currently logged in to the current host";
@ -29,7 +30,8 @@ If FILE is not specified, use {}. /var/log/wtmp as FILE is common.",
) )
} }
pub fn uumain(args: impl uucore::Args) -> i32 { #[uucore_procs::gen_uumain]
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
let usage = usage(); let usage = usage();
let after_help = get_long_usage(); let after_help = get_long_usage();
@ -59,7 +61,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
println!("{}", users.join(" ")); println!("{}", users.join(" "));
} }
0 Ok(())
} }
pub fn uu_app() -> App<'static, 'static> { pub fn uu_app() -> App<'static, 'static> {