Lint
This commit is contained in:
parent
01f0c873a9
commit
f44d4ab407
4 changed files with 2 additions and 31 deletions
|
|
@ -2,7 +2,6 @@ use std::path::Path;
|
|||
|
||||
use anyhow::{Context, Result};
|
||||
use database_config::DatabaseConfig;
|
||||
use log::debug;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use server_config::ServerConfig;
|
||||
use tokio::fs;
|
||||
|
|
@ -12,11 +11,6 @@ pub mod database_config;
|
|||
pub mod server_config;
|
||||
pub mod user_config;
|
||||
|
||||
use crate::{
|
||||
consts::{DEFAULT_HOST, DEFAULT_MAX_CONNECTIONS, DEFAULT_PORT, DEFAULT_SQLITE_URL},
|
||||
errors::SyncServerError,
|
||||
};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
pub struct Config {
|
||||
pub database: DatabaseConfig,
|
||||
|
|
|
|||
|
|
@ -1,14 +1,7 @@
|
|||
use std::path::Path;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use log::debug;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::fs;
|
||||
|
||||
use crate::{
|
||||
consts::{DEFAULT_HOST, DEFAULT_MAX_CONNECTIONS, DEFAULT_PORT, DEFAULT_SQLITE_URL},
|
||||
errors::SyncServerError,
|
||||
};
|
||||
use crate::consts::{DEFAULT_MAX_CONNECTIONS, DEFAULT_SQLITE_URL};
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
pub struct DatabaseConfig {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,7 @@
|
|||
use std::path::Path;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use log::debug;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::fs;
|
||||
|
||||
use crate::{
|
||||
consts::{DEFAULT_HOST, DEFAULT_MAX_BODY_SIZE_MB, DEFAULT_PORT, DEFAULT_SQLITE_URL},
|
||||
errors::SyncServerError,
|
||||
};
|
||||
use crate::consts::{DEFAULT_HOST, DEFAULT_MAX_BODY_SIZE_MB, DEFAULT_PORT};
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
pub struct ServerConfig {
|
||||
#[serde(default = "default_host")]
|
||||
|
|
|
|||
|
|
@ -1,14 +1,5 @@
|
|||
use std::path::Path;
|
||||
|
||||
use anyhow::{Context, Result};
|
||||
use log::debug;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::fs;
|
||||
|
||||
use crate::{
|
||||
consts::{DEFAULT_HOST, DEFAULT_MAX_CONNECTIONS, DEFAULT_PORT, DEFAULT_SQLITE_URL},
|
||||
errors::SyncServerError,
|
||||
};
|
||||
#[derive(Debug, Deserialize, Serialize, Clone)]
|
||||
pub struct UserConfig {
|
||||
#[serde(default = "Vec::new")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue