Skip to content

Commit

Permalink
fix: Remove unnecessary into_iter() after a split()
Browse files Browse the repository at this point in the history
  • Loading branch information
hypr2771 authored and fcsonline committed Apr 28, 2023
1 parent e15e6a0 commit 9636e9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ pub struct Tags<'a> {

impl<'a> Tags<'a> {
pub fn new(tags_option: Option<&'a str>, skip_tags_option: Option<&'a str>) -> Self {
let tags: Option<HashSet<&str>> = tags_option.map(|m| m.split(',').into_iter().map(|s| s.trim()).collect());
let skip_tags: Option<HashSet<&str>> = skip_tags_option.map(|m| m.split(',').into_iter().map(|s| s.trim()).collect());
let tags: Option<HashSet<&str>> = tags_option.map(|m| m.split(',').map(|s| s.trim()).collect());
let skip_tags: Option<HashSet<&str>> = skip_tags_option.map(|m| m.split(',').map(|s| s.trim()).collect());

if let (Some(t), Some(s)) = (&tags, &skip_tags) {
if !t.is_disjoint(s) {
Expand Down

0 comments on commit 9636e9c

Please sign in to comment.