Skip to content

Commit c8a5770

Browse files
authored
Merge pull request #304 from cakebaker/mesg_move_uu_app_to_bottom
mesg: move `uu_app()` to bottom of file
2 parents b686309 + 48bdb19 commit c8a5770

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
@@ -69,6 +69,17 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
6969
Ok(())
7070
}
7171

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

0 commit comments

Comments
 (0)