From 059538b95dddfc26046a67655ff8546c1f832425 Mon Sep 17 00:00:00 2001 From: projectmoon Date: Fri, 21 May 2021 14:14:03 +0000 Subject: [PATCH] Remove remaining warnings. --- src/db/mod.rs | 1 - src/db/sqlite/migrator/migrations/V4__room_events.rs | 3 ++- src/db/sqlite/migrator/migrations/V5__room_users.rs | 2 +- src/db/sqlite/state.rs | 1 - src/db/sqlite/variables.rs | 5 ----- src/logic.rs | 3 +-- 6 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/db/mod.rs b/src/db/mod.rs index f25bccd..c2a107e 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -1,7 +1,6 @@ use async_trait::async_trait; use errors::DataError; use std::collections::{HashMap, HashSet}; -use std::str::FromStr; use crate::models::RoomInfo; diff --git a/src/db/sqlite/migrator/migrations/V4__room_events.rs b/src/db/sqlite/migrator/migrations/V4__room_events.rs index 8657a98..63f8f7b 100644 --- a/src/db/sqlite/migrator/migrations/V4__room_events.rs +++ b/src/db/sqlite/migrator/migrations/V4__room_events.rs @@ -1,5 +1,6 @@ use barrel::backend::Sqlite; -use barrel::{types, types::Type, Migration}; +use barrel::{types, Migration}; + pub fn migration() -> String { let mut m = Migration::new(); diff --git a/src/db/sqlite/migrator/migrations/V5__room_users.rs b/src/db/sqlite/migrator/migrations/V5__room_users.rs index eedec4d..bee782f 100644 --- a/src/db/sqlite/migrator/migrations/V5__room_users.rs +++ b/src/db/sqlite/migrator/migrations/V5__room_users.rs @@ -1,5 +1,5 @@ use barrel::backend::Sqlite; -use barrel::{types, types::Type, Migration}; +use barrel::{types, Migration}; pub fn migration() -> String { let mut m = Migration::new(); diff --git a/src/db/sqlite/state.rs b/src/db/sqlite/state.rs index dfeed44..31a922d 100644 --- a/src/db/sqlite/state.rs +++ b/src/db/sqlite/state.rs @@ -35,7 +35,6 @@ impl DbState for Database { #[cfg(test)] mod tests { - use super::*; use crate::db::sqlite::Database; use crate::db::DbState; diff --git a/src/db/sqlite/variables.rs b/src/db/sqlite/variables.rs index 4f96eab..2898bba 100644 --- a/src/db/sqlite/variables.rs +++ b/src/db/sqlite/variables.rs @@ -3,11 +3,6 @@ use crate::db::{errors::DataError, Variables}; use async_trait::async_trait; use std::collections::HashMap; -struct UserVariableRow { - key: String, - value: i32, -} - #[async_trait] impl Variables for Database { async fn get_user_variables( diff --git a/src/logic.rs b/src/logic.rs index f0efed6..046590f 100644 --- a/src/logic.rs +++ b/src/logic.rs @@ -1,9 +1,8 @@ -use crate::db::errors::DataError; use crate::db::Rooms; use crate::error::BotError; use crate::matrix; use crate::models::RoomInfo; -use futures::stream::{self, StreamExt, TryStreamExt}; +use futures::stream::{self, StreamExt}; use matrix_sdk::{self, identifiers::RoomId, Client}; /// Record the information about a room, including users in it.