From 20d954c10b359db8aaee008868bc7d2e968be224 Mon Sep 17 00:00:00 2001 From: pantonshire Date: Sun, 30 Apr 2023 16:38:12 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20debounce=5Funit=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 709f71b..f792eee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -83,6 +83,12 @@ impl Debouncer> { } } +impl Debouncer<()> { + pub fn debounce_unit(&self) { + self.debounce((), |_acc, _event_data| ()); + } +} + impl Drop for Debouncer { fn drop(&mut self) { self.controller.notify_shutdown();