Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2022-08-10 12:58:28 +0300
committerSebastian Dröge <sebastian@centricular.com>2022-08-10 12:58:28 +0300
commitbdaa39e267be5028cb7a00b156466992f5a3de9e (patch)
tree832b6664cbc073c4a13603f0d6dc6b38816c755c /generic
parent8ee8ae581aae44860bb891d5be3d567c19e49ef2 (diff)
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
Diffstat (limited to 'generic')
-rw-r--r--generic/threadshare/src/runtime/executor/async_wrapper.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/threadshare/src/runtime/executor/async_wrapper.rs b/generic/threadshare/src/runtime/executor/async_wrapper.rs
index 434533aa6..7da220010 100644
--- a/generic/threadshare/src/runtime/executor/async_wrapper.rs
+++ b/generic/threadshare/src/runtime/executor/async_wrapper.rs
@@ -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),
}