Skip to content

Commit

Permalink
Fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
spk committed Jul 29, 2018
1 parent 33028d7 commit b627142
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion benches/basic_basic.rs
Expand Up @@ -2,8 +2,8 @@
extern crate sidekiq;
extern crate test;

use test::Bencher;
use sidekiq::{create_redis_pool, Client, ClientOpts, Job};
use test::Bencher;

fn get_client() -> Client {
let ns = "test";
Expand Down
1 change: 0 additions & 1 deletion rustfmt.toml
@@ -1,2 +1 @@
max_width = 101
write_mode = "Overwrite"
5 changes: 3 additions & 2 deletions src/lib.rs
Expand Up @@ -20,5 +20,6 @@ extern crate serde_json;

mod sidekiq;
pub use serde_json::value::Value;
pub use sidekiq::{create_redis_pool, Client, ClientOpts, Job, JobOpts, RedisPool,
RedisPooledConnection};
pub use sidekiq::{
create_redis_pool, Client, ClientOpts, Job, JobOpts, RedisPool, RedisPooledConnection,
};
21 changes: 12 additions & 9 deletions src/sidekiq/mod.rs
@@ -1,20 +1,20 @@
extern crate redis;

use std::default::Default;
use std::env;
use std::fmt;
use std::error::Error;
use std::default::Default;
use std::fmt;
use std::time::{SystemTime, UNIX_EPOCH};

use Value;
use rand::{thread_rng, Rng};
use r2d2::Error as PoolError;
use r2d2::{Pool, PooledConnection};
use r2d2_redis::RedisConnectionManager;
use rand::distributions::Alphanumeric;
use serde::{Serialize, Serializer};
use rand::{thread_rng, Rng};
use serde::ser::SerializeStruct;
use serde::{Serialize, Serializer};
use serde_json;
use r2d2_redis::RedisConnectionManager;
use r2d2::{Pool, PooledConnection};
use r2d2::Error as PoolError;
use Value;

const REDIS_URL_ENV: &str = "REDIS_URL";
const REDIS_URL_DEFAULT: &str = "redis://127.0.0.1/";
Expand Down Expand Up @@ -99,7 +99,10 @@ impl Default for JobOpts {
.duration_since(UNIX_EPOCH)
.unwrap()
.as_secs() as u64;
let jid = thread_rng().sample_iter(&Alphanumeric).take(24).collect::<String>();
let jid = thread_rng()
.sample_iter(&Alphanumeric)
.take(24)
.collect::<String>();
JobOpts {
retry: 25,
queue: "default".to_string(),
Expand Down

0 comments on commit b627142

Please sign in to comment.