summaryrefslogtreecommitdiff
path: root/src/tiff/exif.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tiff/exif.rs')
-rw-r--r--src/tiff/exif.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tiff/exif.rs b/src/tiff/exif.rs
index 629f4e8..4bf3f80 100644
--- a/src/tiff/exif.rs
+++ b/src/tiff/exif.rs
@@ -297,9 +297,9 @@ impl ExifValue for Rational {
}
}
-impl ToString for Rational {
- fn to_string(&self) -> String {
- format!("{}/{}", self.num, self.denom)
+impl std::fmt::Display for Rational {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{}/{}", self.num, self.denom)
}
}
@@ -361,9 +361,9 @@ impl ExifValue for SRational {
}
}
-impl ToString for SRational {
- fn to_string(&self) -> String {
- format!("{}/{}", self.num, self.denom)
+impl std::fmt::Display for SRational {
+ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(f, "{}/{}", self.num, self.denom)
}
}