Skip to content

Commit

Permalink
Add an empty method to GameFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
Hukadan committed Mar 10, 2024
1 parent 008952a commit ec07388
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/db/game_filer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,17 @@ impl GameFilter {
.filter(|x| self.check_game(x, search_type))
.collect()
}
pub fn is_empty(&self) -> bool {
self.name.is_none()
&& self.engine.is_none()
&& self.runtime.is_none()
&& self.genre.is_none()
&& self.tag.is_none()
&& self.year.is_none()
&& self.dev.is_none()
&& self.publi.is_none()
&& self.status.is_none()
}
}

#[cfg(test)]
Expand Down

0 comments on commit ec07388

Please sign in to comment.