diff --git a/src/dependency.rs b/src/dependency.rs index cd17996..69a54c9 100644 --- a/src/dependency.rs +++ b/src/dependency.rs @@ -1,6 +1,6 @@ use anyhow::{bail, Result}; use regex::Regex; -use std::cell::LazyCell; +use std::sync::LazyLock; #[derive(Debug, PartialEq, Eq, Clone)] pub enum Dependency { @@ -19,7 +19,7 @@ pub enum Dependency { } pub fn parse_dependency(s: &str) -> Result { - static RE: LazyCell = LazyCell::new(|| { + static RE: LazyLock = LazyLock::new(|| { Regex::new(r"^((?P[^+=/]+)=)?(?P((?P\w+://([^:@]+(:[^@]+)?@)?[^#+]*?(?P/[^#+/]+)?)(#branch=(?P[^+]+)|#rev=(?P[^+]+))?)|[^+]+)?(?P(\+[^+]+)*)$") .unwrap() });