Skip to content

Commit 4a1d750

Browse files
committed
String -> &str
1 parent b803db3 commit 4a1d750

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/blocker.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,13 +367,13 @@ impl Blocker {
367367
return None;
368368
}
369369

370-
let mut disabled_directives: HashSet<String> = HashSet::new();
371-
let mut enabled_directives: HashSet<String> = HashSet::new();
370+
let mut disabled_directives: HashSet<&str> = HashSet::new();
371+
let mut enabled_directives: HashSet<&str> = HashSet::new();
372372

373-
for filter in filters {
373+
for filter in filters.iter() {
374374
if filter.is_exception() {
375375
if filter.is_csp() {
376-
if let Some(csp_directive) = filter.modifier_option {
376+
if let Some(csp_directive) = &filter.modifier_option {
377377
disabled_directives.insert(csp_directive);
378378
} else {
379379
// Exception filters with empty `csp` options will disable all CSP
@@ -382,7 +382,7 @@ impl Blocker {
382382
}
383383
}
384384
} else if filter.is_csp() {
385-
if let Some(csp_directive) = filter.modifier_option {
385+
if let Some(csp_directive) = &filter.modifier_option {
386386
enabled_directives.insert(csp_directive);
387387
}
388388
}

0 commit comments

Comments
 (0)