diff --git a/common/lighthouse_version/src/lib.rs b/common/lighthouse_version/src/lib.rs index f5d4d44878..c499bf0498 100644 --- a/common/lighthouse_version/src/lib.rs +++ b/common/lighthouse_version/src/lib.rs @@ -37,8 +37,9 @@ mod test { #[test] fn version_formatting() { - let re = Regex::new(r"^Lighthouse/v[0-9]+\.[0-9]+\.[0-9]+(-rc.[0-9])?-[[:xdigit:]]{7}\+?$") - .unwrap(); + let re = + Regex::new(r"^Lighthouse/v[0-9]+\.[0-9]+\.[0-9]+(-rc.[0-9])?(-[[:xdigit:]]{7})?\+?$") + .unwrap(); assert!( re.is_match(VERSION), "version doesn't match regex: {}",