Skip to content

Commit

Permalink
use for range loop
Browse files Browse the repository at this point in the history
  • Loading branch information
RikaCelery committed Oct 14, 2024
1 parent df7234b commit 43ae5cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pattern.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func patternMatch(ctx *Ctx, pattern Pattern, msgs []message.Segment) bool {
patternState := make([]PatternParsed, len(pattern.segments))

j := 0
for i := 0; i < len(pattern.segments); i++ {
for i := range pattern.segments {
if j < len(msgs) && pattern.segments[i].matchType(msgs[j]) {
patternState[i] = pattern.segments[i].parse(&msgs[j])
}
Expand Down

0 comments on commit 43ae5cd

Please sign in to comment.