Update crossbeam-channel requirement from 0.2 to 0.3 (#436)

* Update crossbeam-channel requirement from 0.2 to 0.3

Updates the requirements on [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam-channel) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam-channel/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam-channel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam-channel/commits/v0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* fixing build
This commit is contained in:
dependabot[bot]
2018-11-16 14:26:59 +09:00
committed by Paul Masurel
parent c92f41aea8
commit 7b9752f897
2 changed files with 6 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ levenshtein_automata = {version="0.1", features=["fst_automaton"]}
bit-set = "0.5"
uuid = { version = "0.7", features = ["v4", "serde"] }
crossbeam = "0.5"
crossbeam-channel = "0.2"
crossbeam-channel = "0.3"
futures = "0.1"
futures-cpupool = "0.1"
owning_ref = "0.4"

View File

@@ -392,7 +392,7 @@ impl IndexWriter {
self.worker_id, generation
)).spawn(move || {
loop {
let mut document_iterator = document_receiver_clone.clone().peekable();
let mut document_iterator = document_receiver_clone.clone().into_iter().peekable();
// the peeking here is to avoid
// creating a new segment's files
@@ -640,7 +640,10 @@ impl IndexWriter {
pub fn add_document(&mut self, document: Document) -> u64 {
let opstamp = self.stamper.stamp();
let add_operation = AddOperation { opstamp, document };
self.document_sender.send(add_operation);
let send_result = self.document_sender.send(add_operation);
if let Err(e) = send_result {
panic!("Failed to index document. Sending to indexing channel failed. This probably means all of the indexing threads have panicked. {:?}", e);
}
opstamp
}
}