Skip to content

Commit

Permalink
Remove redundant set checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cbondurant committed Aug 6, 2020
1 parent e7dfe43 commit 82301f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.rs
Expand Up @@ -223,13 +223,13 @@ pub fn initialize_songs<P: AsRef<Path>>(paths: &[P]) -> HashMap<String, Song> {
has_multiple_loops: false,
has_dedicated_transitions: false
});
if !song.has_end && segment.id == "end"{
if segment.id == "end"{
song.has_end = true;
}
if !song.has_multiple_loops && segment.id != "loop" && REGEX_IS_LOOP.is_match(&segment.id) {
if segment.id != "loop" && REGEX_IS_LOOP.is_match(&segment.id) {
song.has_multiple_loops = true;
}
if !song.has_dedicated_transitions && REGEX_IS_DEDICATED_TRANSITION.is_match(&segment.id) {
if REGEX_IS_DEDICATED_TRANSITION.is_match(&segment.id) {
song.has_dedicated_transitions = true;
}
if song.segments.contains_key(&segment.id.to_string()) {
Expand Down

0 comments on commit 82301f3

Please sign in to comment.