We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90c4d6e commit 2affea0Copy full SHA for 2affea0
src/haystack/units/mod.rs
@@ -24,7 +24,7 @@ pub fn get_unit(unit: &str) -> Option<&'static Unit> {
24
25
/// Tries to get the unit by name, if none is found, return a default unit
26
pub fn get_unit_or_default(unit: &str) -> &'static Unit {
27
- get_unit(unit).unwrap_or_else(|| &*DEFAULT_UNIT)
+ get_unit(unit).unwrap_or(&*DEFAULT_UNIT)
28
}
29
30
/// Match units for the dimension
0 commit comments