diff --git a/src/session.rs b/src/session.rs index d24d10f..cbb8faa 100644 --- a/src/session.rs +++ b/src/session.rs @@ -336,10 +336,11 @@ impl Client { } /// Issue the specified [`WebDriverCompatibleCommand`] to the WebDriver instance. - pub async fn issue_cmd( - &self, - cmd: impl Into>, - ) -> Result { + pub async fn issue_cmd(&self, cmd: C) -> Result + where + C: Into>, + CC: WebDriverCompatibleCommand + Send + 'static, + { self.issue(Cmd::WebDriver(cmd.into())).await } diff --git a/tests/local.rs b/tests/local.rs index c34a74f..1fe26af 100644 --- a/tests/local.rs +++ b/tests/local.rs @@ -27,21 +27,6 @@ impl WebDriverCompatibleCommand for GetTitle { fn method_and_body(&self, _: &url::Url) -> (http::Method, Option) { (http::Method::GET, None) } - - fn is_new_session(&self) -> bool { - false - } - - fn is_legacy(&self) -> bool { - false - } -} - -// Implement `Into>` for `GetTitle` -impl Into> for GetTitle { - fn into(self) -> Box { - Box::new(self) - } } async fn goto(c: Client, port: u16) -> Result<(), error::CmdError> {