Skip to content

Commit 6c19faa

Browse files
authored
Fix issue with lifetime elision
Hello, according to rust-lang/rust#63376 , the compiler used to accept the current function signature of `drain_extensions()` by mistake, the compiler will soon fix this (after the above PR lands), and after that the current code won't compile. This PR fixes the code. Please note that the latest published version soketto-0.2.2 contains this error too.
1 parent d4fecc0 commit 6c19faa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/handshake.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl<'a> Client<'a> {
9191
}
9292

9393
/// Get back all extensions.
94-
pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> {
94+
pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> + '_ {
9595
self.extensions.drain()
9696
}
9797
}
@@ -280,7 +280,7 @@ impl<'a> Server<'a> {
280280
}
281281

282282
/// Get back all extensions.
283-
pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> {
283+
pub fn drain_extensions(&mut self) -> impl Iterator<Item = Box<dyn Extension + Send>> + '_ {
284284
self.extensions.drain()
285285
}
286286
}

0 commit comments

Comments
 (0)