Skip to content

Commit

Permalink
fix: cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
philbooth committed Jul 31, 2018
1 parent 58f5481 commit 80e4471
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/dispatcher.rs
@@ -1,13 +1,13 @@
//! `Dispatcher` is a command dispatching actor that distributes commands to the appropriate
//! actor for a given user. If an actor for that user is no longer active, it creates and
//! initializes the actor before dispatching the command.
use std::sync::{Arc, Mutex, MutexGuard, RwLock};
use std::collections::HashMap;
use std::io::{Error, ErrorKind};
use std::sync::{Arc, Mutex, MutexGuard, RwLock};

use actix::{Actor, Addr, Context, SyncContext, Handler, Message};
use actix::{Actor, Addr, Context, Handler, Message, SyncContext};

use db::models::{BSO, DBConfig, DBManager, PutBSO};
use db::models::{DBConfig, DBManager, PutBSO, BSO};
use db::util::ms_since_epoch;

// Messages that can be sent to the user
Expand Down
2 changes: 1 addition & 1 deletion src/handlers.rs
@@ -1,7 +1,7 @@
//! API Handlers
use actix::{ActorResponse, Addr};
use actix_web::{
error, Error, AsyncResponder, FromRequest, FutureResponse, HttpRequest, HttpResponse, Json,
error, AsyncResponder, Error, FromRequest, FutureResponse, HttpRequest, HttpResponse, Json,
Path, Responder, State,
};
use futures::Future;
Expand Down
6 changes: 3 additions & 3 deletions src/server/mod.rs
Expand Up @@ -3,8 +3,8 @@
#[cfg(test)]
mod test;

use std::sync::{Arc, RwLock};
use std::collections::HashMap;
use std::sync::{Arc, RwLock};

use actix::{SyncArbiter, System, SystemRunner};
use actix_web::{http, middleware::cors::Cors, server::HttpServer, App};
Expand All @@ -24,8 +24,8 @@ impl Server {

// Start dispatcher with the arbiter
let db_pool = Arc::new(RwLock::new(HashMap::new()));
let db_executor = SyncArbiter::start(num_cpus::get(), move || {
DBExecutor { db_handles: db_pool.clone() }
let db_executor = SyncArbiter::start(num_cpus::get(), move || DBExecutor {
db_handles: db_pool.clone(),
});

HttpServer::new(move || {
Expand Down

0 comments on commit 80e4471

Please sign in to comment.