Skip to content

Commit 48bdb19

Browse files
committed
mesg: move uu_app() to bottom of file
1 parent dae500f commit 48bdb19

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/uu/mesg/src/mesg.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
6868
Ok(())
6969
}
7070

71+
#[cfg(not(target_family = "unix"))]
72+
#[uucore::main]
73+
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
74+
let _matches: ArgMatches = uu_app().try_get_matches_from(args)?;
75+
76+
Err(uucore::error::USimpleError::new(
77+
1,
78+
"`mesg` is available only on Unix platforms.",
79+
))
80+
}
81+
7182
pub fn uu_app() -> Command {
7283
Command::new(uucore::util_name())
7384
.version(crate_version!())
@@ -88,14 +99,3 @@ pub fn uu_app() -> Command {
8899
.action(ArgAction::Set),
89100
)
90101
}
91-
92-
#[cfg(not(target_family = "unix"))]
93-
#[uucore::main]
94-
pub fn uumain(args: impl uucore::Args) -> UResult<()> {
95-
let _matches: ArgMatches = uu_app().try_get_matches_from(args)?;
96-
97-
Err(uucore::error::USimpleError::new(
98-
1,
99-
"`mesg` is available only on Unix platforms.",
100-
))
101-
}

0 commit comments

Comments
 (0)