Skip to content

Commit 77b6e7c

Browse files
committed
chore: formatting
1 parent dce7d01 commit 77b6e7c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/segment/filter/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ pub trait AMQFilter {
5353
fn contains(&self, item: &[u8]) -> bool;
5454
fn contains_hash(&self, hash: (u64, u64)) -> bool;
5555
}
56+
5657
#[enum_dispatch::enum_dispatch(AMQFilter)]
5758
#[derive(PartialEq, Debug)]
5859
pub enum BloomFilter {
5960
StandardBloom(StandardBloomFilter),
6061
BlockedBloom(BlockedBloomFilter),
6162
}
6263

63-
#[derive(Debug, PartialEq)]
6464
pub enum BloomFilterType {
6565
StandardBloom = 0,
6666
BlockedBloom = 1,

src/segment/filter/standard_bloom/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::{bit_array::BitArrayReader, AMQFilter, BloomFilter};
1+
use super::{bit_array::BitArrayReader, AMQFilter, BloomFilter, BloomFilterType};
22
use crate::{
33
coding::{Decode, DecodeError, Encode, EncodeError},
44
file::MAGIC_BYTES,
@@ -80,7 +80,7 @@ impl Encode for StandardBloomFilter {
8080
// Write header
8181
writer.write_all(&MAGIC_BYTES)?;
8282

83-
writer.write_u8(0)?; // TODO: How to make this a enum?
83+
writer.write_u8(BloomFilterType::StandardBloom as u8)?;
8484

8585
// NOTE: Hash type (unused)
8686
writer.write_u8(0)?;

0 commit comments

Comments
 (0)