mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-10-08 18:56:42 +02:00
prettyprint error from main; fix some doctests
This commit is contained in:
parent
ab6959a84f
commit
30b3802b56
4 changed files with 67 additions and 63 deletions
23
src/tek.rs
23
src/tek.rs
|
|
@ -26,11 +26,11 @@ fn main () -> Usually<()> {
|
|||
_guard
|
||||
};
|
||||
tengri::Tui::setup_panic();
|
||||
#[cfg(feature = "cli")] {
|
||||
Config::watched(crate::cli::run_with_config)?;
|
||||
}
|
||||
#[cfg(not(feature = "cli"))] {
|
||||
Config::watched(run_new_plain)?;
|
||||
#[cfg(feature = "cli")] let outcome = Config::watched(crate::cli::run_with_config);
|
||||
#[cfg(not(feature = "cli"))] let outcome = Config::watched(run_new_plain);
|
||||
if let Err(e) = outcome {
|
||||
println!("{e:#?}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
@ -334,16 +334,15 @@ mod app {
|
|||
///
|
||||
/// ```
|
||||
/// let mut proj = tek::Arrangement::default();
|
||||
/// proj.jack = tek::tengri::Jack::new(&"test_tek").expect("failed to connect to jack");
|
||||
/// let mut conf = std::sync::Arc::new(tek::Config::default());
|
||||
/// conf.add("(mode hello)");
|
||||
/// let tek = tek::App::new(None, proj, conf, "hello");
|
||||
/// proj.jack = tek::tengri::Jack::new(&"test_tek").expect("failed to connect to jack");
|
||||
/// let mut conf = tek::config_load(tek::Config::default(), "(mode hello)").unwrap();
|
||||
/// let tek = tek::App::new(None, proj, conf.into(), "hello");
|
||||
/// ```
|
||||
pub fn new (
|
||||
exit: Option<Exit>,
|
||||
exit: Option<Exit>,
|
||||
project: Arrangement,
|
||||
config: Arc<Config>,
|
||||
mode: impl AsRef<str>
|
||||
config: Arc<Config>,
|
||||
mode: impl AsRef<str>
|
||||
) -> Self {
|
||||
App {
|
||||
exit: exit.unwrap_or_default(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue