From bfed1183018ae8f543f428bfde23c5f08fd6ceaa Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 20 Feb 2024 03:29:10 +0000 Subject: [PATCH] chore: remove redundant imports --- auth/simple-auth-server/src/errors.rs | 2 -- basics/hello-world/src/main.rs | 2 +- databases/mongodb/src/test.rs | 1 - databases/sqlite/src/main.rs | 2 +- json/json/src/main.rs | 2 +- websockets/chat-broker/src/session.rs | 2 +- websockets/chat-tcp/src/server.rs | 2 +- websockets/chat/src/server.rs | 2 +- 8 files changed, 6 insertions(+), 9 deletions(-) diff --git a/auth/simple-auth-server/src/errors.rs b/auth/simple-auth-server/src/errors.rs index 54c29d1..09365c4 100644 --- a/auth/simple-auth-server/src/errors.rs +++ b/auth/simple-auth-server/src/errors.rs @@ -1,5 +1,3 @@ -use std::convert::From; - use actix_web::{error::ResponseError, HttpResponse}; use derive_more::Display; use diesel::result::{DatabaseErrorKind, Error as DBError}; diff --git a/basics/hello-world/src/main.rs b/basics/hello-world/src/main.rs index 98229e9..ac4340d 100644 --- a/basics/hello-world/src/main.rs +++ b/basics/hello-world/src/main.rs @@ -25,7 +25,7 @@ async fn main() -> std::io::Result<()> { #[cfg(test)] mod tests { - use actix_web::{body::to_bytes, dev::Service, http, test, web, App, Error}; + use actix_web::{body::to_bytes, dev::Service, http, test, Error}; use super::*; diff --git a/databases/mongodb/src/test.rs b/databases/mongodb/src/test.rs index 3a0b1c7..3fbd51e 100644 --- a/databases/mongodb/src/test.rs +++ b/databases/mongodb/src/test.rs @@ -2,7 +2,6 @@ use actix_web::{ test::{call_and_read_body, call_and_read_body_json, init_service, TestRequest}, web::Bytes, }; -use mongodb::Client; use super::*; diff --git a/databases/sqlite/src/main.rs b/databases/sqlite/src/main.rs index b9c13a7..1a74e2b 100644 --- a/databases/sqlite/src/main.rs +++ b/databases/sqlite/src/main.rs @@ -16,7 +16,7 @@ use std::io; use actix_web::{middleware, web, App, Error as AWError, HttpResponse, HttpServer}; use futures_util::future::join_all; -use r2d2_sqlite::{self, SqliteConnectionManager}; +use r2d2_sqlite::SqliteConnectionManager; mod db; use db::{Pool, Queries}; diff --git a/json/json/src/main.rs b/json/json/src/main.rs index 92eee15..385bc4c 100644 --- a/json/json/src/main.rs +++ b/json/json/src/main.rs @@ -55,7 +55,7 @@ async fn main() -> std::io::Result<()> { #[cfg(test)] mod tests { - use actix_web::{body::to_bytes, dev::Service, http, test, web, App}; + use actix_web::{body::to_bytes, dev::Service, http, test}; use super::*; diff --git a/websockets/chat-broker/src/session.rs b/websockets/chat-broker/src/session.rs index ae9d483..ae41f2c 100644 --- a/websockets/chat-broker/src/session.rs +++ b/websockets/chat-broker/src/session.rs @@ -1,4 +1,4 @@ -use actix::{fut, prelude::*}; +use actix::prelude::*; use actix_broker::BrokerIssue; use actix_web_actors::ws; diff --git a/websockets/chat-tcp/src/server.rs b/websockets/chat-tcp/src/server.rs index eb3c1fa..6a28801 100644 --- a/websockets/chat-tcp/src/server.rs +++ b/websockets/chat-tcp/src/server.rs @@ -5,7 +5,7 @@ use std::collections::{HashMap, HashSet}; use actix::prelude::*; -use rand::{self, rngs::ThreadRng, Rng}; +use rand::{rngs::ThreadRng, Rng}; use crate::session; diff --git a/websockets/chat/src/server.rs b/websockets/chat/src/server.rs index 8559859..59bb200 100644 --- a/websockets/chat/src/server.rs +++ b/websockets/chat/src/server.rs @@ -11,7 +11,7 @@ use std::{ }; use actix::prelude::*; -use rand::{self, rngs::ThreadRng, Rng}; +use rand::{rngs::ThreadRng, Rng}; /// Chat server sends this messages to session #[derive(Message)]