diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-07 03:13:34 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-07 03:13:34 +0800 |
| commit | 3ea5d62e980975d0a888293d875f26fc267cd368 (patch) | |
| tree | 04af421148a4efbb001928cce0d7d386bd94027e /mling/src/lib.rs | |
| parent | 21defab2fc95f1e1d0639b66ab2c449266a114fe (diff) | |
Refactor CLI entry points and move main logic to library
Diffstat (limited to 'mling/src/lib.rs')
| -rw-r--r-- | mling/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mling/src/lib.rs b/mling/src/lib.rs index 0f58ccc..d4ce697 100644 --- a/mling/src/lib.rs +++ b/mling/src/lib.rs @@ -5,6 +5,8 @@ use mingling::{ res::ResExitCode, }; +pub mod cli; + mod cargo_style; pub use cargo_style::*; pub mod display; @@ -17,7 +19,7 @@ use crate::display::markdown; #[renderer] pub fn render_error_dispatch_not_found(err: ErrorDispatcherNotFound, ec: &mut ResExitCode) { - if err.len() < 1 { + if err.is_empty() { r_println!("{}", markdown(include_str!("helps/mling_help.txt"))); ec.exit_code = 0; } else { |
