Skip to content

Commit

Permalink
Merge pull request #26 from schani-rs/dependabot/cargo/lapin-futures-…
Browse files Browse the repository at this point in the history
…0.11.1

Update lapin-futures requirement to 0.11.1
  • Loading branch information
ChristophWurst authored Apr 16, 2018
2 parents d5444cc + 84af2aa commit 3b1bd91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ dotenv = "0.11.0"
env_logger = "0.4.3"
futures = "0.1.17"
hyper = "^0.11"
lapin-async = "*"
lapin-futures = "0.10.0"
lapin-futures = "0.11.1"
log = "0.4.1"
schani_library_client = { git = "https://github.com/schani-rs/schani_library_client.git" }
schani_store_client = { git = "https://github.com/schani-rs/schani_store_client.git" }
Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ extern crate dotenv;
extern crate env_logger;
extern crate futures;
extern crate hyper;
extern crate lapin_async;
extern crate lapin_futures as lapin;
#[macro_use]
extern crate log;
Expand Down Expand Up @@ -30,7 +29,7 @@ use futures::Future;
use hyper::Uri;
use schani_library_client::{Image, LibraryClient};
use schani_store_client::StoreClient;
use lapin_async::queue::Message;
use lapin::message::Delivery;
use tokio_core::reactor::Core;

struct Config {
Expand Down Expand Up @@ -68,7 +67,7 @@ pub fn run() {
let lib_client = Arc::new(LibraryClient::new(config.library_uri.clone(), &handle));
let store_client = Arc::new(StoreClient::new(config.store_uri.clone(), &handle));

queue::run(&host_addr, core, &|message: Message| {
queue::run(&host_addr, core, &|message: Delivery| {
info!("got message: {:?}", message);
let image_id = str::from_utf8(&message.data)
.unwrap()
Expand Down
4 changes: 2 additions & 2 deletions src/queue/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::thread;

use futures::{Future, Stream};
use lapin;
use lapin_async::queue::Message;
use lapin::message::Delivery;
use lapin::client::ConnectionOptions;
use lapin::types::FieldTable;
use lapin::channel::{BasicConsumeOptions, QueueDeclareOptions};
Expand All @@ -14,7 +14,7 @@ use tokio_core::net::TcpStream;
pub fn run(
addr: &net::SocketAddr,
mut core: Core,
fun: &Fn(Message) -> Box<Future<Item = Message, Error = io::Error>>,
fun: &Fn(Delivery) -> Box<Future<Item = Delivery, Error = io::Error>>,
) {
let work = TcpStream::connect(addr, &core.handle())
.and_then(|stream| {
Expand Down

0 comments on commit 3b1bd91

Please sign in to comment.