Skip to content

Commit 2affea0

Browse files
committed
Fix lint issue
1 parent 90c4d6e commit 2affea0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/haystack/units/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn get_unit(unit: &str) -> Option<&'static Unit> {
2424

2525
/// Tries to get the unit by name, if none is found, return a default unit
2626
pub fn get_unit_or_default(unit: &str) -> &'static Unit {
27-
get_unit(unit).unwrap_or_else(|| &*DEFAULT_UNIT)
27+
get_unit(unit).unwrap_or(&*DEFAULT_UNIT)
2828
}
2929

3030
/// Match units for the dimension

0 commit comments

Comments
 (0)