fmt
This commit is contained in:
parent
d715d94b6d
commit
a7b588da97
14 changed files with 48 additions and 48 deletions
|
|
@ -38,7 +38,7 @@ fn default_cursor_timeout() -> Duration {
|
|||
impl DatabaseConfig {
|
||||
pub fn validate(&self) -> Result<()> {
|
||||
ensure!(
|
||||
self.databases_directory_path.as_os_str().len() > 0,
|
||||
!self.databases_directory_path.as_os_str().is_empty(),
|
||||
"databases_directory_path must not be empty"
|
||||
);
|
||||
ensure!(
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ use log::debug;
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::{
|
||||
consts::{DEFAULT_LOG_DIRECTORY, DEFAULT_LOG_LEVEL, DEFAULT_LOG_ROTATION_INTERVAL, DURATION_ZERO},
|
||||
consts::{
|
||||
DEFAULT_LOG_DIRECTORY, DEFAULT_LOG_LEVEL, DEFAULT_LOG_ROTATION_INTERVAL, DURATION_ZERO,
|
||||
},
|
||||
utils::log_level::LogLevel,
|
||||
};
|
||||
|
||||
|
|
@ -27,7 +29,10 @@ impl LoggingConfig {
|
|||
!self.log_directory.is_empty(),
|
||||
"log_directory must not be an empty string"
|
||||
);
|
||||
ensure!(self.log_rotation > DURATION_ZERO, "log_rotation must be greater than 0");
|
||||
ensure!(
|
||||
self.log_rotation > DURATION_ZERO,
|
||||
"log_rotation must be greater than 0"
|
||||
);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue