1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use regex::Regex; pub struct Match { pub column: String, pub regex: Regex, } impl Match { #[allow(clippy::trivial_regex)] pub fn new() -> Result<Self, Box<dyn std::error::Error>> { Ok(Match { column: String::new(), regex: Regex::new("")?, }) } }