Skip to content

Commit

Permalink
fix: impl Debug for Edges
Browse files Browse the repository at this point in the history
  • Loading branch information
salam99823 committed Dec 2, 2024
1 parent 2839629 commit 9c10420
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,9 @@ impl From<&image::DynamicImage> for Edges {

impl fmt::Debug for Edges {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"Edges {{{}\n}}",
format!(
"\nraw: {:#?},\ntranslated: {:#?}",
self.image_edges(),
self.translate_objects(self.image_edges())
)
.replace('\n', "\n "),
)
f.debug_struct("Edges")
.field("raw", &self.image_edges())
.field("translated", &self.translate_objects(self.image_edges()))
.finish()
}
}

0 comments on commit 9c10420

Please sign in to comment.