forked from Skynet/discord-bot
Remove RwLock for database
This commit is contained in:
parent
d8f785b0db
commit
062f826d28
15 changed files with 39 additions and 64 deletions
|
@ -12,11 +12,10 @@ use sqlx::{
|
|||
Error, FromRow, Pool, Row, Sqlite,
|
||||
};
|
||||
use std::{str::FromStr, sync::Arc};
|
||||
use tokio::sync::RwLock;
|
||||
|
||||
pub struct DataBase;
|
||||
impl TypeMapKey for DataBase {
|
||||
type Value = Arc<RwLock<Pool<Sqlite>>>;
|
||||
type Value = Arc<Pool<Sqlite>>;
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue