From 47a8426f60baddd6bf1bd42c20cc5c667d1e3f6b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 28 Jan 2021 16:08:38 +0000 Subject: [PATCH] wdt: wip new pos handling trait Signed-off-by: Ian Jackson --- wdriver.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wdriver.rs b/wdriver.rs index 742177ce..c335c0cc 100644 --- a/wdriver.rs +++ b/wdriver.rs @@ -1103,6 +1103,17 @@ impl Drop for FinalInfoCollection { } } +trait IntoInWindow { + fn w_into<'g>(self, w: &'g WindowGuard) -> Result; +} + +impl IntoInWindow for Pos { + #[throws(AE)] + fn w_into<'g>(self, w: &'g WindowGuard) -> WebPos { + w.posg2posw(self)? + } +} + impl Drop for Setup { fn drop(&mut self) { (||{ -- 2.30.2