mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-07-06 22:25:34 +00:00
Avoid unnecessary unwrap
This commit is contained in:
parent
81a566a097
commit
99d1311d63
9 changed files with 72 additions and 22 deletions
|
@ -1,7 +1,7 @@
|
|||
use std::ops::DerefMut;
|
||||
use std::sync::Mutex;
|
||||
|
||||
use anyhow::{ensure, Context, Result};
|
||||
use parking_lot::Mutex;
|
||||
use rusqlite::{params, Connection, OpenFlags};
|
||||
|
||||
use crate::config::DatabaseConfig;
|
||||
|
@ -57,7 +57,7 @@ impl Database {
|
|||
}
|
||||
|
||||
pub fn get(&self) -> impl DerefMut<Target = Connection> + '_ {
|
||||
self.conn.lock().unwrap()
|
||||
self.conn.lock()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue