Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
proofrock committed Oct 9, 2023
1 parent 4865ffc commit c55c9ac
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/db_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use eyre::Result;
use std::fs::File;
use std::io::Read;

use crate::commons::{default_as_false, default_as_true, default_as_zero};
use crate::commons::{default_as_false, default_as_zero};

#[derive(Debug, Deserialize, Clone)]
pub enum AuthMode {
Expand Down Expand Up @@ -100,7 +100,7 @@ pub struct Backup {
pub execution: ExecutionMode,
}

#[derive(Debug, Deserialize, Clone)]
#[derive(Debug, Default, Deserialize, Clone)]
pub struct DbConfig {
pub auth: Option<Auth>,
#[serde(rename = "journalMode")]
Expand All @@ -119,21 +119,6 @@ pub struct DbConfig {
pub backup: Option<Backup>,
}

impl Default for DbConfig {
fn default() -> DbConfig {
DbConfig {
auth: None,
journal_mode: None,
read_only: false,
cors_origin: None,
use_only_stored_statements: false,
stored_statements: None,
macros: None,
backup: None,
}
}
}

pub fn parse_dbconf(filename: &String) -> Result<DbConfig> {
let mut file = File::open(filename)?;
let mut content = String::new();
Expand Down

0 comments on commit c55c9ac

Please sign in to comment.