refactor(cli): simplify applet detection and remove feature-based defaults
This commit is contained in:
1 parent
dc65daec75
commit
efaa60cbd4
2 files changed
+78
-37
No files matched your search
@@ -6,9 +6,7 @@ use std::{
|
||||
};
|
||||
|
||||
use irtt_cli::{
|
||||
applet::{
|
||||
default_applet_for_features, detect_applet_from_argv0, AppletAvailability, RequestedApplet,
|
||||
},
|
||||
applet::{dispatch_from_argv, AppletDispatch, RequestedApplet},
|
||||
signal::install_signal_handler,
|
||||
};
|
||||
|
||||
@@ -44,15 +42,6 @@ fn run_from_env() -> Result<(), Box<dyn std::error::Error>> {
|
||||
}
|
||||
}
|
||||
|
||||
fn default_requested_applet() -> Result<RequestedApplet, Box<dyn std::error::Error>> {
|
||||
match default_applet_for_features(cfg!(feature = "client"), cfg!(feature = "tui"), false) {
|
||||
AppletAvailability::Client => Ok(RequestedApplet::Client),
|
||||
AppletAvailability::Tui => Ok(RequestedApplet::Tui),
|
||||
AppletAvailability::Server => Ok(RequestedApplet::Server),
|
||||
AppletAvailability::None => Err("no runnable applet is available in this build".into()),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "client")]
|
||||
fn run_client_applet(
|
||||
argv: Vec<OsString>,
|
||||
|
||||
Reference in new issue
Block a user