From 7536e055840f74f1f7bda8ffecf851cb3e500147 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sat, 26 Aug 2023 08:14:50 -0400 Subject: [PATCH] syntax: remove superfluous `borrow` Best guess is that the parser used to use something other than a `&str`, but I can't remember. --- regex-syntax/src/ast/parse.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/regex-syntax/src/ast/parse.rs b/regex-syntax/src/ast/parse.rs index 9cf64e9ec..47ea2586b 100644 --- a/regex-syntax/src/ast/parse.rs +++ b/regex-syntax/src/ast/parse.rs @@ -383,7 +383,7 @@ impl<'s, P: Borrow> ParserI<'s, P> { /// Return a reference to the pattern being parsed. fn pattern(&self) -> &str { - self.pattern.borrow() + self.pattern } /// Create a new error with the given span and error type.