소스 검색

Remove TODO

David Peter 2 년 전
부모
커밋
1d12880780
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      numbat/src/quantity.rs

+ 1 - 4
numbat/src/quantity.rs

@@ -249,10 +249,7 @@ impl std::ops::Neg for Quantity {
 
 impl std::fmt::Display for Quantity {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        // TODO: we do not always want to canonicalize
-        let mut unit_canonicalized = self.unit.clone();
-        unit_canonicalized.canonicalize();
-        write!(f, "{:.6} {}", self.value.to_f64(), unit_canonicalized)
+        write!(f, "{:.6} {}", self.value.to_f64(), self.unit)
     }
 }