mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-08 18:25:30 +00:00
threadshare: Fix some new clippy beta warnings
warning: this expression borrows a value the compiler would automatically borrow --> generic/threadshare/src/runtime/executor/async_wrapper.rs:402:19 | 402 | match (&mut *self).get_mut().read(buf) { | ^^^^^^^^^^^^ help: change this to: `(*self)` | = note: `#[warn(clippy::needless_borrow)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
This commit is contained in:
parent
8ee8ae581a
commit
bdaa39e267
1 changed files with 5 additions and 5 deletions
|
@ -399,7 +399,7 @@ impl<T: Read + Send + 'static> AsyncRead for Async<T> {
|
|||
buf: &mut [u8],
|
||||
) -> Poll<io::Result<usize>> {
|
||||
loop {
|
||||
match (&mut *self).get_mut().read(buf) {
|
||||
match (*self).get_mut().read(buf) {
|
||||
Err(err) if err.kind() == io::ErrorKind::WouldBlock => {}
|
||||
res => return Poll::Ready(res),
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ impl<T: Read + Send + 'static> AsyncRead for Async<T> {
|
|||
bufs: &mut [IoSliceMut<'_>],
|
||||
) -> Poll<io::Result<usize>> {
|
||||
loop {
|
||||
match (&mut *self).get_mut().read_vectored(bufs) {
|
||||
match (*self).get_mut().read_vectored(bufs) {
|
||||
Err(err) if err.kind() == io::ErrorKind::WouldBlock => {}
|
||||
res => return Poll::Ready(res),
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ impl<T: Write + Send + 'static> AsyncWrite for Async<T> {
|
|||
buf: &[u8],
|
||||
) -> Poll<io::Result<usize>> {
|
||||
loop {
|
||||
match (&mut *self).get_mut().write(buf) {
|
||||
match (*self).get_mut().write(buf) {
|
||||
Err(err) if err.kind() == io::ErrorKind::WouldBlock => {}
|
||||
res => return Poll::Ready(res),
|
||||
}
|
||||
|
@ -476,7 +476,7 @@ impl<T: Write + Send + 'static> AsyncWrite for Async<T> {
|
|||
bufs: &[IoSlice<'_>],
|
||||
) -> Poll<io::Result<usize>> {
|
||||
loop {
|
||||
match (&mut *self).get_mut().write_vectored(bufs) {
|
||||
match (*self).get_mut().write_vectored(bufs) {
|
||||
Err(err) if err.kind() == io::ErrorKind::WouldBlock => {}
|
||||
res => return Poll::Ready(res),
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ impl<T: Write + Send + 'static> AsyncWrite for Async<T> {
|
|||
|
||||
fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
|
||||
loop {
|
||||
match (&mut *self).get_mut().flush() {
|
||||
match (*self).get_mut().flush() {
|
||||
Err(err) if err.kind() == io::ErrorKind::WouldBlock => {}
|
||||
res => return Poll::Ready(res),
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue