Skip to content

Commit

Permalink
simplify Default for SqliteOptions
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
  • Loading branch information
andrewwhitehead committed Apr 18, 2022
1 parent 012bc9d commit ce308eb
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/backend/sqlite/provision.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,7 @@ pub struct SqliteStoreOptions {

impl Default for SqliteStoreOptions {
fn default() -> Self {
Self {
in_memory: true,
path: ":memory:".into(),
busy_timeout: DEFAULT_BUSY_TIMEOUT,
max_connections: num_cpus::get() as u32,
min_connections: DEFAULT_MIN_CONNECTIONS,
journal_mode: DEFAULT_JOURNAL_MODE,
locking_mode: DEFAULT_LOCKING_MODE,
shared_cache: DEFAULT_SHARED_CACHE,
synchronous: DEFAULT_SYNCHRONOUS,
}
Self::new(":memory:").expect("Error initializing with default options")
}
}

Expand Down

0 comments on commit ce308eb

Please sign in to comment.