From 335f7e7d8c3e91975078a3474fe10dfd3cf37a12 Mon Sep 17 00:00:00 2001 From: Mark Hoekveen Date: Sun, 12 May 2024 16:07:43 +0200 Subject: [PATCH] removes default implementation of info --- src/descriptors/dct.rs | 3 +++ src/descriptors/mod.rs | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/descriptors/dct.rs b/src/descriptors/dct.rs index 15cb98a..fbcc9d9 100644 --- a/src/descriptors/dct.rs +++ b/src/descriptors/dct.rs @@ -103,6 +103,9 @@ impl DCT { } impl Descriptor for DCT { + fn info(&self) -> String { + "DCT".to_string() + } fn describe(&self, img: &image::DynamicImage) -> u64 { let resized = self.resize(img); let mut dct_values = self.dct(&resized); diff --git a/src/descriptors/mod.rs b/src/descriptors/mod.rs index 88ccf30..8d5806c 100644 --- a/src/descriptors/mod.rs +++ b/src/descriptors/mod.rs @@ -2,9 +2,8 @@ //! If two images are (almost) the same, their descriptions will be the same. pub trait Descriptor { - fn info(&self) -> String { - "Descriptor".to_string() - } + /// Print the name of the descriptor, + fn info(&self) -> String; fn resize(&self, img: &image::DynamicImage) -> image::DynamicImage { img.grayscale().thumbnail_exact(8, 8) }