use lazy_static::lazystatic;
lazy_static! {
static ref ABC: Regex = Regex::new(r"(.*)").unwrap();
}
I want to remove the unwrap() and handle error...
use lazy_static::lazystatic;
lazy_static! {
static ref ABC: Result<Regex, Error> = Regex::new(r"(.*)")?;
}
I also tried to use a match statement , and if let on ABC,
But it says ABC is a struct and it is match to Result