From e361e3db0d59f46c4aff9ba6599abfb45fbfa682 Mon Sep 17 00:00:00 2001 From: Grafcube Date: Thu, 23 May 2024 21:01:46 +0530 Subject: [PATCH] Change feedback to return Option<&Feedback> (#73) --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d7cfa54..a726c03 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -110,8 +110,8 @@ impl Entropy { } /// Feedback to help choose better passwords. Set when `score` <= 2. - pub fn feedback(&self) -> &Option { - &self.feedback + pub fn feedback(&self) -> Option<&feedback::Feedback> { + self.feedback.as_ref() } /// The list of patterns the guess calculation was based on