Skip to content

Commit a203314

Browse files
committed
fix: lifetime constraint
1 parent bb70b7b commit a203314

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/socket/tcp.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,9 +2575,7 @@ impl<'a> Socket<'a> {
25752575
.unwrap_or(&PollAt::Ingress)
25762576
}
25772577
}
2578-
}
25792578

2580-
impl Socket<'static> {
25812579
/// Replace the receive buffer with a new one.
25822580
///
25832581
/// The requirements for the new buffer are:
@@ -2593,10 +2591,10 @@ impl Socket<'static> {
25932591
///
25942592
/// See also the [new_with_window_scaling](struct.Socket.html#method.new_with_window_scaling) and
25952593
/// [local_recv_win_scale](struct.Socket.html#method.local_recv_win_scale) methods.
2596-
pub fn replace_recv_buffer<T: Into<SocketBuffer<'static>>>(
2594+
pub fn replace_recv_buffer<T: Into<SocketBuffer<'a>>>(
25972595
&mut self,
25982596
new_buffer: T,
2599-
) -> Result<SocketBuffer<'static>, SocketBuffer<'static>> {
2597+
) -> Result<SocketBuffer<'a>, SocketBuffer<'a>> {
26002598
let mut replaced_buf = new_buffer.into();
26012599
/* Check if the new buffer is valid
26022600
* Requirements:

0 commit comments

Comments
 (0)