FIX: Apply copilot hints

This commit is contained in:
Nicolás Hatcher
2025-07-03 20:33:39 +02:00
committed by Nicolás Hatcher Andrés
parent b1327d83d4
commit 689f55effa
2 changed files with 4 additions and 3 deletions

View File

@@ -5,11 +5,12 @@ use super::Node;
use regex::Regex;
use std::sync::OnceLock;
static RE: OnceLock<Regex> = OnceLock::new();
static RANGE_REFERENCE_REGEX: OnceLock<Regex> = OnceLock::new();
#[allow(clippy::expect_used)]
fn get_re() -> &'static Regex {
RE.get_or_init(|| Regex::new(r":[A-Z]*[0-9]*$").expect("Regex is known to be valid"))
RANGE_REFERENCE_REGEX
.get_or_init(|| Regex::new(r":[A-Z]*[0-9]*$").expect("Regex is known to be valid"))
}
fn is_range_reference(s: &str) -> bool {