From 8d1a1c10b599ebe238d01e14025ccf05b14b87b9 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 13 Jan 2023 10:00:33 +0000 Subject: [PATCH] rust: Use clippy suggestion for auto dereference error: deref which would be done by auto-deref --> tests/bare_bones.rs:86:19 | 86 | let handle = ((*plugin).open)(0); | ^^^^^^^^^ help: try this: `plugin` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref = note: `-D clippy::explicit-auto-deref` implied by `-D warnings` --- plugins/rust/tests/bare_bones.rs | 4 ++-- plugins/rust/tests/full_featured.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/rust/tests/bare_bones.rs b/plugins/rust/tests/bare_bones.rs index 0a729afe..8a09cb57 100644 --- a/plugins/rust/tests/bare_bones.rs +++ b/plugins/rust/tests/bare_bones.rs @@ -83,7 +83,7 @@ fn with_fixture(mut f: F) { let pluginp = unsafe { PLUGIN.unwrap()}; let plugin = unsafe {&*pluginp}; - let handle = ((*plugin).open)(0); + let handle = (plugin.open)(0); let mut fixture = Fixture { mockp, plugin, @@ -92,7 +92,7 @@ fn with_fixture(mut f: F) { f(&mut fixture); - ((*plugin).close)(handle); + (plugin.close)(handle); } diff --git a/plugins/rust/tests/full_featured.rs b/plugins/rust/tests/full_featured.rs index fb8ec3ba..d5f02e06 100644 --- a/plugins/rust/tests/full_featured.rs +++ b/plugins/rust/tests/full_featured.rs @@ -115,7 +115,7 @@ fn with_fixture(mut f: F) { let pluginp = unsafe { PLUGIN.unwrap()}; let plugin = unsafe {&*pluginp}; - let handle = ((*plugin).open)(0); + let handle = (plugin.open)(0); open_ctx.checkpoint(); // clear expectations for MockServer::open let mut fixture = Fixture { mockp, @@ -125,7 +125,7 @@ fn with_fixture(mut f: F) { f(&mut fixture); - ((*plugin).close)(handle); + (plugin.close)(handle); } /// Helper for testing methods that take a handle and return a boolean -- 2.11.4.GIT