&* is simply just bad. let deref coercion figure it out

This commit is contained in:
leocth
2022-02-20 22:54:05 +08:00
parent 6b11613b99
commit 596ca8ab4f
7 changed files with 18 additions and 20 deletions

View File

@@ -45,7 +45,7 @@ pub fn parse_os_rule(rule: &OsRule) -> bool {
let regex = Regex::new(version.as_str());
if let Ok(regex) = regex {
if !regex.is_match(&*sys_info::os_release().unwrap_or_default()) {
if !regex.is_match(&sys_info::os_release().unwrap_or_default()) {
return false;
}
}