mirror of
https://github.com/actix/examples
synced 2024-11-23 22:41:07 +01:00
chore: remove redundant imports
This commit is contained in:
parent
dfde2ea718
commit
bfed118301
@ -1,5 +1,3 @@
|
|||||||
use std::convert::From;
|
|
||||||
|
|
||||||
use actix_web::{error::ResponseError, HttpResponse};
|
use actix_web::{error::ResponseError, HttpResponse};
|
||||||
use derive_more::Display;
|
use derive_more::Display;
|
||||||
use diesel::result::{DatabaseErrorKind, Error as DBError};
|
use diesel::result::{DatabaseErrorKind, Error as DBError};
|
||||||
|
@ -25,7 +25,7 @@ async fn main() -> std::io::Result<()> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
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::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ use actix_web::{
|
|||||||
test::{call_and_read_body, call_and_read_body_json, init_service, TestRequest},
|
test::{call_and_read_body, call_and_read_body_json, init_service, TestRequest},
|
||||||
web::Bytes,
|
web::Bytes,
|
||||||
};
|
};
|
||||||
use mongodb::Client;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ use std::io;
|
|||||||
|
|
||||||
use actix_web::{middleware, web, App, Error as AWError, HttpResponse, HttpServer};
|
use actix_web::{middleware, web, App, Error as AWError, HttpResponse, HttpServer};
|
||||||
use futures_util::future::join_all;
|
use futures_util::future::join_all;
|
||||||
use r2d2_sqlite::{self, SqliteConnectionManager};
|
use r2d2_sqlite::SqliteConnectionManager;
|
||||||
|
|
||||||
mod db;
|
mod db;
|
||||||
use db::{Pool, Queries};
|
use db::{Pool, Queries};
|
||||||
|
@ -55,7 +55,7 @@ async fn main() -> std::io::Result<()> {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
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::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
use actix::{fut, prelude::*};
|
use actix::prelude::*;
|
||||||
use actix_broker::BrokerIssue;
|
use actix_broker::BrokerIssue;
|
||||||
use actix_web_actors::ws;
|
use actix_web_actors::ws;
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
|
|
||||||
use actix::prelude::*;
|
use actix::prelude::*;
|
||||||
use rand::{self, rngs::ThreadRng, Rng};
|
use rand::{rngs::ThreadRng, Rng};
|
||||||
|
|
||||||
use crate::session;
|
use crate::session;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use actix::prelude::*;
|
use actix::prelude::*;
|
||||||
use rand::{self, rngs::ThreadRng, Rng};
|
use rand::{rngs::ThreadRng, Rng};
|
||||||
|
|
||||||
/// Chat server sends this messages to session
|
/// Chat server sends this messages to session
|
||||||
#[derive(Message)]
|
#[derive(Message)]
|
||||||
|
Loading…
Reference in New Issue
Block a user