diff --git a/util/blooms-db/benches/blooms.rs b/util/blooms-db/benches/blooms.rs index 1cb3bad54..4a0c54fbd 100644 --- a/util/blooms-db/benches/blooms.rs +++ b/util/blooms-db/benches/blooms.rs @@ -31,8 +31,8 @@ use ethbloom::Bloom; fn blooms_filter_1_million_ok(b: &mut Bencher) { let tempdir = TempDir::new("").unwrap(); let database = Database::open(tempdir.path()).unwrap(); - database.insert_blooms(999_999, iter::once(&Bloom::from(0))).unwrap(); - let bloom = Bloom::from(0x001); + database.insert_blooms(999_999, iter::once(&Bloom::zero())).unwrap(); + let bloom = Bloom::from_low_u64_be(0x001); database.insert_blooms(200_000, iter::once(&bloom)).unwrap(); database.insert_blooms(400_000, iter::once(&bloom)).unwrap(); database.insert_blooms(600_000, iter::once(&bloom)).unwrap(); @@ -48,9 +48,9 @@ fn blooms_filter_1_million_ok(b: &mut Bencher) { fn blooms_filter_1_million_miss(b: &mut Bencher) { let tempdir = TempDir::new("").unwrap(); let database = Database::open(tempdir.path()).unwrap(); - database.insert_blooms(999_999, iter::once(&Bloom::from(0))).unwrap(); - let bloom = Bloom::from(0x001); - let bad_bloom = Bloom::from(0x0001); + database.insert_blooms(999_999, iter::once(&Bloom::zero())).unwrap(); + let bloom = Bloom::from_low_u64_be(0x001); + let bad_bloom = Bloom::from_low_u64_be(0x0001); database.insert_blooms(200_000, iter::once(&bloom)).unwrap(); database.insert_blooms(400_000, iter::once(&bloom)).unwrap(); database.insert_blooms(600_000, iter::once(&bloom)).unwrap(); @@ -66,9 +66,9 @@ fn blooms_filter_1_million_miss(b: &mut Bencher) { fn blooms_filter_1_million_miss_and_ok(b: &mut Bencher) { let tempdir = TempDir::new("").unwrap(); let database = Database::open(tempdir.path()).unwrap(); - database.insert_blooms(999_999, iter::once(&Bloom::from(0))).unwrap(); - let bloom = Bloom::from(0x001); - let bad_bloom = Bloom::from(0x0001); + database.insert_blooms(999_999, iter::once(&Bloom::zero())).unwrap(); + let bloom = Bloom::from_low_u64_be(0x001); + let bad_bloom = Bloom::from_low_u64_be(0x0001); database.insert_blooms(200_000, iter::once(&bloom)).unwrap(); database.insert_blooms(400_000, iter::once(&bloom)).unwrap(); database.insert_blooms(600_000, iter::once(&bloom)).unwrap(); diff --git a/util/blooms-db/src/db.rs b/util/blooms-db/src/db.rs index f3cf837cd..b91d48237 100644 --- a/util/blooms-db/src/db.rs +++ b/util/blooms-db/src/db.rs @@ -19,7 +19,7 @@ use std::path::{Path, PathBuf}; use ethbloom; use crate::file::{File, FileIterator}; -fn other_io_err(e: E) -> io::Error where E: Into> { +fn other_io_err(e: E) -> io::Error where E: Into> { io::Error::new(io::ErrorKind::Other, e) }