From 1378d7dab21b0deb8533fc1ee66ea6189d60cfe0 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 5 Apr 2021 17:15:44 +0100 Subject: [PATCH] wdriver: LogIgnoreBefore: More impls Signed-off-by: Ian Jackson --- wdriver/wdriver.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wdriver/wdriver.rs b/wdriver/wdriver.rs index 745d7a05..7c649475 100644 --- a/wdriver/wdriver.rs +++ b/wdriver/wdriver.rs @@ -266,7 +266,15 @@ pub trait LogIgnoreBefore { type LogIgnoreBeforeFn<'r> = &'r mut dyn FnMut(&str) -> bool; impl<'r> LogIgnoreBefore for LogIgnoreBeforeFn<'r> { - fn matches<'s>(&mut self, s: &'s str) -> bool { self(s) } + fn matches(&mut self, s: &str) -> bool { self(s) } +} +impl LogIgnoreBefore for HtmlLit { + fn matches(&mut self, s: &str) -> bool { s.contains(self.as_html_str()) } +} +impl LogIgnoreBefore for Generation { + fn matches(&mut self, s: &str) -> bool { + s == synch_logentry(*self).as_html_str() + } } impl<'g> WindowGuard<'g> { -- 2.30.2