Skip to content

Commit

Permalink
temp-not-sure-if-this-lint-should-be-disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Mar 23, 2022
1 parent 9de5473 commit 68e7a8d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions artichoke-backend/src/extn/core/matchdata/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,8 @@ impl MatchData {
Bound::Excluded(start) => self.haystack.get(..=start),
Bound::Unbounded => return &[],
};
pre.unwrap_or_else(|| {
// if start is out of range, the whole haystack is the pre match
self.haystack.as_slice()
})
// if start is out of range, the whole haystack is the pre match
pre.unwrap_or(self.haystack.as_slice())
}

#[must_use]
Expand Down

0 comments on commit 68e7a8d

Please sign in to comment.