Skip to content

Commit

Permalink
Fix lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rracariu committed Oct 14, 2022
1 parent 90c4d6e commit 2affea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/haystack/units/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub fn get_unit(unit: &str) -> Option<&'static Unit> {

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

/// Match units for the dimension
Expand Down

0 comments on commit 2affea0

Please sign in to comment.