summaryrefslogtreecommitdiff
path: root/src/eval/str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/str.rs')
-rw-r--r--src/eval/str.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval/str.rs b/src/eval/str.rs
index b1551564..d867e19c 100644
--- a/src/eval/str.rs
+++ b/src/eval/str.rs
@@ -118,7 +118,7 @@ impl Str {
/// The text of the pattern's first match in this string.
pub fn find(&self, pattern: StrPattern) -> Option<Self> {
match pattern {
- StrPattern::Str(pat) => self.0.contains(pat.as_str()).then(|| pat),
+ StrPattern::Str(pat) => self.0.contains(pat.as_str()).then_some(pat),
StrPattern::Regex(re) => re.find(self).map(|m| m.as_str().into()),
}
}