Skip to content

Commit 5c1e3bf

Browse files
committed
cargo fmt
1 parent a48509d commit 5c1e3bf

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/filters/network.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,10 @@ impl NetworkFilter {
893893
}
894894
}
895895

896-
pub fn get_tokens_optimized<'a>(&'a self, tokens_buffer: &'a mut TokensBuffer) -> FilterTokens<'a> {
896+
pub fn get_tokens_optimized<'a>(
897+
&'a self,
898+
tokens_buffer: &'a mut TokensBuffer,
899+
) -> FilterTokens<'a> {
897900
tokens_buffer.clear();
898901

899902
// If there is only one domain and no domain negation, we also use this
@@ -947,7 +950,8 @@ impl NetworkFilter {
947950

948951
// If we got no tokens for the filter/hostname part, then we will dispatch
949952
// this filter in multiple buckets based on the domains option.
950-
if tokens_buffer.is_empty() && self.opt_domains.is_some() && self.opt_not_domains.is_none() {
953+
if tokens_buffer.is_empty() && self.opt_domains.is_some() && self.opt_not_domains.is_none()
954+
{
951955
if let Some(opt_domains) = self.opt_domains.as_ref() {
952956
if !opt_domains.is_empty() {
953957
return FilterTokens::OptDomains(opt_domains);

tests/unit/filters/network.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,10 +1194,7 @@ mod parse_tests {
11941194
let mut tokens_buffer = utils::TokensBuffer::default();
11951195
assert_eq!(
11961196
filter.get_tokens_optimized(&mut tokens_buffer),
1197-
FilterTokens::Other(&[
1198-
utils::fast_hash("some"),
1199-
utils::fast_hash("primewire")
1200-
])
1197+
FilterTokens::Other(&[utils::fast_hash("some"), utils::fast_hash("primewire")])
12011198
);
12021199
}
12031200
}

0 commit comments

Comments
 (0)