summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/definitions.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/definitions.rs b/src/definitions.rs
index 84703f9..0c79b6f 100644
--- a/src/definitions.rs
+++ b/src/definitions.rs
@@ -367,10 +367,10 @@ impl Units {
pub fn render(&self, unit: &str, value: QValue) -> String {
if let Some(idx) = self.all.get(unit) {
let scal = (value / self.qvals[*idx]).value();
- format!("{} {}", scal, self.raw[*idx].suffix)
+ format!("{:.3} {}", scal, self.raw[*idx].suffix)
} else {
// Unable to find the unit, so render rawish?
- format!("{} ({}?)", value.value(), unit)
+ format!("{:.3} ({}?)", value.value(), unit)
}
}
}