tisonkun commented on code in PR #232:
URL: https://github.com/apache/datasketches-rust/pull/232#discussion_r3877439338


##########
datasketches/src/cpc/sketch.rs:
##########
@@ -471,6 +472,35 @@ impl CpcSketch {
     }
 }
 
+impl fmt::Display for CpcSketch {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        let flavor = match self.flavor() {
+            Flavor::Empty => "Empty",
+            Flavor::Sparse => "Sparse",
+            Flavor::Hybrid => "Hybrid",
+            Flavor::Pinned => "Pinned",
+            Flavor::Sliding => "Sliding",
+        };

Review Comment:
   I think you can either just use the `Debug` impl for flavor here or define a 
`pub const fn as_str` for Flavor`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to