Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libs/mpmc-channel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl<T> MPMC<T> {
}

#[inline]
pub fn produce(&self) -> Producer<T> {
pub fn produce(&self) -> Producer<'_, T> {
let guard = self.inner.lock().unwrap();
Producer {
cvar: &self.cvar,
Expand All @@ -52,15 +52,15 @@ impl<T> MPMC<T> {
}

#[inline]
pub fn consume(&self) -> Consume<T> {
pub fn consume(&self) -> Consume<'_, T> {
let guard = self.inner.lock().unwrap();
Consume {
cvar: &self.cvar,
guard,
}
}

pub fn try_produce(&self) -> Result<Producer<T>, WouldBlock> {
pub fn try_produce(&self) -> Result<Producer<'_, T>, WouldBlock> {
let guard = match self.inner.try_lock() {
Ok(val) => val,
Err(TryLockError::WouldBlock) => return Err(WouldBlock),
Expand All @@ -72,7 +72,7 @@ impl<T> MPMC<T> {
})
}

pub fn try_consume(&self) -> Result<Consume<T>, WouldBlock> {
pub fn try_consume(&self) -> Result<Consume<'_, T>, WouldBlock> {
let guard = match self.inner.try_lock() {
Ok(val) => val,
Err(TryLockError::WouldBlock) => return Err(WouldBlock),
Expand Down
2 changes: 1 addition & 1 deletion src/net/tcp/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct WriteHalf<'a> {
me: &'a TcpStream,
}

pub fn split(stream: &mut TcpStream) -> (ReadHalf, WriteHalf) {
pub fn split(stream: &mut TcpStream) -> (ReadHalf<'_>, WriteHalf<'_>) {
(ReadHalf { me: stream }, WriteHalf { me: stream })
}

Expand Down
2 changes: 1 addition & 1 deletion src/net/tcp/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl TcpStream {
self.io.set_ttl(ttl)
}

pub fn split(&mut self) -> (ReadHalf, WriteHalf) {
pub fn split(&mut self) -> (ReadHalf<'_>, WriteHalf<'_>) {
split(self)
}

Expand Down
2 changes: 1 addition & 1 deletion src/runtime/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl Handle {
crate::future::block_on(fut)
}

pub fn enter(&self) -> EnterGuard {
pub fn enter(&self) -> EnterGuard<'_> {
self.ctx.clone().init();
EnterGuard::new()
}
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/multithread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl Runtime {
&self.handle
}

pub fn enter(&self) -> EnterGuard {
pub fn enter(&self) -> EnterGuard<'_> {
self.handle.ctx.clone().init();
EnterGuard::new()
}
Expand Down
Loading