From 1f06dcef649c90968c23ffbcd663f3fc8380883e Mon Sep 17 00:00:00 2001 From: Aadhavan Srinivasan Date: Sun, 16 Feb 2025 15:51:53 -0500 Subject: [PATCH] Just declare the variable instead of initializing it as well --- regex/compile.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regex/compile.go b/regex/compile.go index 6ba669f..6cd0e59 100644 --- a/regex/compile.go +++ b/regex/compile.go @@ -498,7 +498,7 @@ func shuntingYard(re string, flags ...ReFlag) ([]postfixNode, error) { } } else if re_postfix[i] == 'p' || re_postfix[i] == 'P' { charClassInverted := (re_postfix[i] == 'P') - charsInClass := []rune{} + var charsInClass []rune i++ if isUnicodeCharClassLetter(re_postfix[i]) { var err error @@ -713,7 +713,7 @@ func shuntingYard(re string, flags ...ReFlag) ([]postfixNode, error) { } } else if re_postfix[i] == 'p' || re_postfix[i] == 'P' { charClassInverted := (re_postfix[i] == 'P') - charsInList := []rune{} + var charsInList []rune i++ if isUnicodeCharClassLetter(re_postfix[i]) { var err error