summaryrefslogtreecommitdiff
path: root/src/eval/str.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-06-13 23:16:40 +0200
committerLaurenz <laurmaedje@gmail.com>2022-06-14 13:53:02 +0200
commitc81e2a5f56eb262663f292578c683fba7f18251f (patch)
tree6c045a8dcbec5e75e01a15f970ef8cee6ff042d0 /src/eval/str.rs
parent891af17260a6750a74a102388a05e59cf1ffc3c1 (diff)
Many fixes
Diffstat (limited to 'src/eval/str.rs')
-rw-r--r--src/eval/str.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/eval/str.rs b/src/eval/str.rs
index 514bf318..a0345312 100644
--- a/src/eval/str.rs
+++ b/src/eval/str.rs
@@ -45,15 +45,10 @@ impl StrExt for EcoString {
pub struct Regex(regex::Regex);
impl Regex {
- /// Create a new regex.
+ /// Create a new regular expression.
pub fn new(re: &str) -> StrResult<Self> {
regex::Regex::new(re).map(Self).map_err(|err| err.to_string())
}
-
- /// Whether the regex matches the given `text`.
- pub fn matches(&self, text: &str) -> bool {
- self.0.is_match(text)
- }
}
impl Deref for Regex {