get rid of uneccessary expects/unwraps in open_upend; logging
This commit is contained in:
parent
fedf417787
commit
c2705d328d
1 changed files with 6 additions and 3 deletions
|
@ -713,16 +713,19 @@ pub fn open_upend<P: AsRef<Path>>(dirpath: P, reinitialize: bool) -> Result<Open
|
||||||
enable_foreign_keys: true,
|
enable_foreign_keys: true,
|
||||||
busy_timeout: Some(Duration::from_secs(30)),
|
busy_timeout: Some(Duration::from_secs(30)),
|
||||||
}))
|
}))
|
||||||
.build(manager)
|
.build(manager)?;
|
||||||
.expect("Failed to create pool.");
|
|
||||||
|
trace!("Pool created, running migrations...");
|
||||||
|
|
||||||
embedded_migrations::run_with_output(
|
embedded_migrations::run_with_output(
|
||||||
&pool.get().unwrap(),
|
&pool.get()?,
|
||||||
&mut LoggerSink {
|
&mut LoggerSink {
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
trace!("Initializing types...");
|
||||||
|
|
||||||
initialize_types(&pool)?;
|
initialize_types(&pool)?;
|
||||||
|
|
||||||
Ok(OpenResult { pool, new })
|
Ok(OpenResult { pool, new })
|
||||||
|
|
Loading…
Reference in a new issue