Skip to content

Commit

Permalink
rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
cholcombe973 committed Aug 18, 2018
1 parent 5debcab commit 05d4004
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 13 deletions.
3 changes: 1 addition & 2 deletions src/lib/dht.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ impl Dht {
hasher: RendezvousNodes::default(),
}
}

}
}
2 changes: 1 addition & 1 deletion src/lib/layout/disperse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::path::PathBuf;
use self::rendezvous_hash::{Node, NodeHasher};
use super::super::config::Peer;

/// Store files across a set of servers and paths. Disperse
/// Store files across a set of servers and paths. Disperse
/// will erasure code a file and distribute it across X Peers
/// and Paths while also storing redundancy pieces of the file
/// on X Peers and Paths
Expand Down
2 changes: 1 addition & 1 deletion src/lib/layout/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extern crate rendezvous_hash;
extern crate rendezvous_hash;

use self::rendezvous_hash::Node;

Expand Down
4 changes: 2 additions & 2 deletions src/lib/layout/replicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fn test_replicate() {
vec![
e1.entry[0].clone(),
e1.entry[1].clone(),
e1.entry[2].clone()
e1.entry[2].clone(),
],
);
}
Expand All @@ -110,7 +110,7 @@ fn test_replicate() {
vec![
e2.entry[0].clone(),
e2.entry[1].clone(),
e2.entry[2].clone()
e2.entry[2].clone(),
],
);
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
pub mod config;
pub mod layout;
pub mod peer;

1 change: 0 additions & 1 deletion src/pipeline/cluster/replicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ impl PipelinePlugin for Replicate {
fn init(&self, options: HashMap<String, Value>, subvolumes: Vec<String>) {}

fn process(&self, name: &str, data: &mut [u8]) -> Result<(&str, &mut [u8]), String> {

Err("Foo".to_string())
}
fn stop(&self) {}
Expand Down
1 change: 1 addition & 0 deletions src/pipeline/features/access-control.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/pipeline/features/locks.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions src/pipeline/performance/io-threads.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

13 changes: 9 additions & 4 deletions src/pipeline/protocols/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use std::thread::JoinHandle;
use self::api::service::*;
use self::futures::Future;
use self::futures_cpupool::CpuPool;
use lib::config::Peer;
use super::super::Value;
use lib::config::Peer;

pub struct Client {
pub peer_name: String,
Expand All @@ -21,16 +21,21 @@ pub struct Client {

// Client sends an RPC request to one or more servers
impl Client {
fn new(&self, name: &str, options: &HashMap<String, Value>, subvolumes: Vec<String>) -> Client{
fn new(&self, name: &str, options: &HashMap<String, Value>, subvolumes: Vec<String>) -> Client {
let pool = CpuPool::new_num_cpus();
Client {
peer_name: name.to_string(),
peer_name: name.to_string(),
pool: pool,
}
}

// The FOP should be processed before being sent by the client
fn process_fop(&self, layout: Vec<(Peer, PathBuf)>, io_type: &Fop, data: &mut FileOperation) -> Result<(), String> {
fn process_fop(
&self,
layout: Vec<(Peer, PathBuf)>,
io_type: &Fop,
data: &mut FileOperation,
) -> Result<(), String> {
// Client is the end of the pipeline.
// send the Fop over to the server(s)
let context = zmq::Context::new();
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline/protocols/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use self::futures::Future;
use self::futures_cpupool::CpuPool;
use super::super::Value;

pub struct Server{
pub struct Server {
// Worker pool
pool: CpuPool,
}
Expand Down

0 comments on commit 05d4004

Please sign in to comment.