Got rid of some rust compiler warnings.

master
Oleksandr Anyshchenko 7 years ago
parent 0475bbeaea
commit 5a2647a436
  1. 8
      src/db_options.rs
  2. 6
      src/merge_operator.rs

@ -1061,11 +1061,15 @@ impl Options {
}
}
/// When a `prefix_extractor` is defined through `opts.set_prefix_extractor` this creates a
/// prefix bloom filter for each memtable with the size of
/// When a `prefix_extractor` is defined through `opts.set_prefix_extractor` this
/// creates a prefix bloom filter for each memtable with the size of
/// `write_buffer_size * memtable_prefix_bloom_ratio` (capped at 0.25).
///
/// Default: `0`
///
/// # Example
///
/// ```
/// use rocksdb::{Options, SliceTransform};
///
/// let mut opts = Options::default();

@ -278,7 +278,7 @@ mod test {
#[repr(packed)]
#[derive(Clone, Debug)]
#[derive(Copy, Clone, Debug)]
struct ValueCounts {
num_a: u32,
num_b: u32,
@ -423,7 +423,7 @@ mod test {
match db.get(b"k2") {
Ok(Some(value)) => {
match from_slice::<ValueCounts>(&*value) {
Some(v) => {
Some(v) => unsafe {
assert_eq!(v.num_a, 1000);
assert_eq!(v.num_b, 500);
assert_eq!(v.num_c, 2000);
@ -438,7 +438,7 @@ mod test {
match db.get(b"k1") {
Ok(Some(value)) => {
match from_slice::<ValueCounts>(&*value) {
Some(v) => {
Some(v) => unsafe {
assert_eq!(v.num_a, 3);
assert_eq!(v.num_b, 2);
assert_eq!(v.num_c, 0);

Loading…
Cancel
Save