From 3ea5d62e980975d0a888293d875f26fc267cd368 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 7 Jun 2026 03:13:34 +0800 Subject: Refactor CLI entry points and move main logic to library --- mling/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mling/src/lib.rs') 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 { -- cgit