Skip to content

Commit

Permalink
saul: Adjust phydat Display to use new name function
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Apr 3, 2024
1 parent 6568416 commit a47eb8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/saul.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl core::fmt::Display for Phydat {
if self.values.scale != 0 {
write!(f, "×10^{}", self.values.scale)?;
}
match Unit::from_c(self.values.unit).map(|u| (u, u.name())) {
match Unit::from_c(self.values.unit).map(|u| (u, u.name_owned::<16>())) {
Some((_, Some(s))) => write!(f, " {}", s)?,
Some((u, _)) => write!(f, " in units of {:?}", u)?,
None => (),
Expand Down

0 comments on commit a47eb8a

Please sign in to comment.