-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a67f1d8
commit f47c61f
Showing
6 changed files
with
58 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
#![recursion_limit = "256"] | ||
|
||
use std::process::ExitCode; | ||
|
||
#[cfg(feature = "cli")] | ||
mod cli; | ||
|
||
pub fn main() { | ||
fn main() -> ExitCode { | ||
#[cfg(feature = "cli")] | ||
cli::main(); | ||
if let Err(e) = cli::main() { | ||
eprintln!("{e}"); | ||
return ExitCode::FAILURE; | ||
} | ||
|
||
#[cfg(not(feature = "cli"))] | ||
panic!("Compiled without cli feature"); | ||
|
||
#[cfg(feature = "cli")] | ||
ExitCode::SUCCESS | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters