f unwrap you can't refuse

This commit is contained in:
jrconlin 2019-10-17 19:21:03 -07:00
parent 5a94f5b648
commit 88f127014f
No known key found for this signature in database
GPG Key ID: 91B7F708D9FC4D84

View File

@ -118,7 +118,7 @@ fn get_weighted_header(
if weights.len() < 2 {
continue;
}
f32::from_str(weights[1]).unwrap_or_else(|_| 0.0)
f32::from_str(weights[1]).unwrap_or(0.0)
} else {
1.0
};