Skip to content

Commit

Permalink
Merge pull request #125 from tinycedar/master
Browse files Browse the repository at this point in the history
Remove warnings accoring to cargo build
  • Loading branch information
LucioFranco committed Jan 29, 2019
2 parents a7569a2 + fb292f5 commit bad3c73
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/bin/toshi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ fn run(catalog: Arc<RwLock<IndexCatalog>>, settings: &Settings) -> impl Future<I
let run = future::lazy(move || connect_to_consul(&settings)).and_then(move |_| {
tokio::spawn(commit_watcher);

let mut consul = Consul::builder()
let consul = Consul::builder()
.with_cluster_name(cluster_name)
.with_address(consul_addr)
.build()
Expand Down
7 changes: 1 addition & 6 deletions src/cluster/placement/background.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@ use crate::cluster::{consul::Consul, ClusterError};
use futures::{try_ready, Future, Poll};
use futures_watch::{Store, Watch};
use log::debug;
use std::collections::{HashSet, VecDeque};
use std::hash::Hash;
use std::collections::HashSet;
use std::net::SocketAddr;
use std::time::{Duration, Instant};
use tokio::sync::mpsc;
use tokio::timer::Delay;
use tower_consul::ConsulService;
use tower_discover::Change;
use tower_service::Service;

pub struct Background {
consul: Consul,
// TODO: better D/S for this?
store: Store<HashSet<SocketAddr>>,
nodes: HashSet<SocketAddr>,
state: State,
interval: Duration,
}
Expand All @@ -32,7 +28,6 @@ impl Background {
let bg = Background {
consul,
store,
nodes: HashSet::new(),
state,
interval,
};
Expand Down
7 changes: 2 additions & 5 deletions src/cluster/placement/mod.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
use crate::cluster::consul::Consul;
use crate::cluster::placement_proto::{server, PlacementReply, PlacementRequest};
use futures::{future, try_ready, Async, Future, Poll, Stream};
use futures::{future, Future, Stream};
use futures_watch::Watch;
use log::error;
use std::collections::HashSet;
use std::fmt;
use std::net::SocketAddr;
use tokio::executor::DefaultExecutor;
use tokio::net::TcpListener;
use tower_discover::{Change, Discover};
use tower_grpc::{Error, Request, Response};
use tower_h2::Server;
use tower_service::Service;

pub mod background;

Expand Down Expand Up @@ -54,7 +51,7 @@ impl Place {
impl server::Placement for Place {
type GetPlacementFuture = GrpcFuture<PlacementReply>;

fn get_placement(&mut self, request: Request<PlacementRequest>) -> Self::GetPlacementFuture {
fn get_placement(&mut self, _request: Request<PlacementRequest>) -> Self::GetPlacementFuture {
unimplemented!()
}
}

0 comments on commit bad3c73

Please sign in to comment.