diff --git a/Cargo.lock b/Cargo.lock index a3c99dc..7920dd5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -429,7 +429,7 @@ dependencies = [ [[package]] name = "distant" -version = "0.15.0-alpha.4" +version = "0.15.0-alpha.5" dependencies = [ "assert_cmd", "assert_fs", @@ -453,7 +453,7 @@ dependencies = [ [[package]] name = "distant-core" -version = "0.15.0-alpha.4" +version = "0.15.0-alpha.5" dependencies = [ "assert_fs", "bytes", @@ -478,7 +478,7 @@ dependencies = [ [[package]] name = "distant-ssh2" -version = "0.15.0-alpha.4" +version = "0.15.0-alpha.5" dependencies = [ "assert_cmd", "assert_fs", diff --git a/distant-ssh2/src/lib.rs b/distant-ssh2/src/lib.rs index 01c692d..6821c0b 100644 --- a/distant-ssh2/src/lib.rs +++ b/distant-ssh2/src/lib.rs @@ -74,14 +74,14 @@ pub struct Ssh2SessionOpts { pub other: BTreeMap, } -pub struct Ssh2AuthHandler { - pub on_authenticate: Box io::Result>>, - pub on_banner: Box, - pub on_host_verify: Box io::Result>, - pub on_error: Box, +pub struct Ssh2AuthHandler<'a> { + pub on_authenticate: Box io::Result> + 'a>, + pub on_banner: Box, + pub on_host_verify: Box io::Result + 'a>, + pub on_error: Box, } -impl Default for Ssh2AuthHandler { +impl Default for Ssh2AuthHandler<'static> { fn default() -> Self { Self { on_authenticate: Box::new(|ev| { @@ -200,7 +200,7 @@ impl Ssh2Session { } /// Authenticates the [`Ssh2Session`] and produces a [`Session`] - pub async fn authenticate(self, mut handler: Ssh2AuthHandler) -> io::Result { + pub async fn authenticate(self, mut handler: Ssh2AuthHandler<'_>) -> io::Result { // Perform the authentication by listening for events and continuing to handle them // until authenticated while let Ok(event) = self.events.recv().await {