chore: update actix-* deps

This commit is contained in:
realaravinth
2022-05-07 16:10:14 +05:30
parent 6d6b494c6f
commit 91c6f77cab
16 changed files with 1101 additions and 1006 deletions

View File

@@ -121,10 +121,6 @@ impl Settings {
pub fn new() -> Result<Self, ConfigError> {
let mut s = Config::new();
// setting default values
#[cfg(test)]
s.set_default("database.pool", 2.to_string())
.expect("Couldn't get the number of CPUs");
const CURRENT_DIR: &str = "./config/default.toml";
const ETC: &str = "/etc/mcaptcha/config.toml";
@@ -162,6 +158,13 @@ impl Settings {
set_database_url(&mut s);
// setting default values
#[cfg(test)]
s.set("database.pool", 2.to_string())
.expect("Couldn't set database pool count");
match s.try_into() {
Ok(val) => Ok(val),
Err(e) => Err(ConfigError::Message(format!("\n\nError: {}. If it says missing fields, then please refer to https://github.com/mCaptcha/mcaptcha#configuration to learn more about how mcaptcha reads configuration\n\n", e))),