no warn in preboot.rs and config.rs + no dbg

pull/19/head
prplV 2024-12-18 11:02:49 +03:00
parent 1578216712
commit 7be46d4373
2 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ use std::os::unix::process::CommandExt;
use std::process::Command; use std::process::Command;
use std::sync::Arc; use std::sync::Arc;
use std::{env, fs}; use std::{env, fs};
use std::fmt::format; // use std::fmt::format;
use super::preboot::PrebootParams; use super::preboot::PrebootParams;
use tokio::time::{Duration, sleep}; use tokio::time::{Duration, sleep};

View File

@ -1,4 +1,5 @@
// module to handle pre-boot params of the monitor // module to handle pre-boot params of the monitor
#[allow(unused_imports)]
use anyhow::{Result, Ok, Error}; use anyhow::{Result, Ok, Error};
use clap::Parser; use clap::Parser;
use std::path::PathBuf; use std::path::PathBuf;
@ -110,7 +111,7 @@ impl PrebootParams {
} }
// existing log dir // existing log dir
if !self.log_to.exists() && !self.no_logs { if !self.log_to.exists() && !self.no_logs {
eprintln!("Error: LogDir not found or Noxis can't read it. LogDir was set to default"); eprintln!("Error: Log-Dir not found or Noxis can't read it. LogDir was set to default");
self.log_to = PathBuf::from("./"); self.log_to = PathBuf::from("./");
// return Err(Error::msg("Log Directory Not Found or Noxis can't read it. Cannot start")); // return Err(Error::msg("Log Directory Not Found or Noxis can't read it. Cannot start"));
} }
@ -121,7 +122,6 @@ impl PrebootParams {
// return Err(Error::msg("Local Config Not Found or Noxis can't read it. Cannot start")); // return Err(Error::msg("Local Config Not Found or Noxis can't read it. Cannot start"));
} }
// redis server check // redis server check
dbg!(&self);
Ok(self) Ok(self)
} }
} }
@ -134,7 +134,7 @@ mod preboot_unitests{
#[test] #[test]
fn parsing_zero_args() { fn parsing_zero_args() {
assert!(PrebootParams::try_parse_from(vec!["runner-rs"]).is_ok()) assert!(PrebootParams::try_parse_from(vec!["runner-rs"]).is_ok())
} }
#[test] #[test]
fn parsing_hagent_valid_args() { fn parsing_hagent_valid_args() {