summarylogtreecommitdiffstats
path: root/clippy.patch
diff options
context:
space:
mode:
Diffstat (limited to 'clippy.patch')
-rw-r--r--clippy.patch92
1 files changed, 0 insertions, 92 deletions
diff --git a/clippy.patch b/clippy.patch
deleted file mode 100644
index 4ef79a01d9d1..000000000000
--- a/clippy.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 0bea254145636014e6c9defae1ed65ae07de65df Mon Sep 17 00:00:00 2001
-From: Alan Somers <asomers@gmail.com>
-Date: Tue, 1 Nov 2022 10:22:57 -0600
-Subject: [PATCH] Rust plugin: Clippy cleanup
-
-Fix lints in the latest clippy
-* box-default
-* explicit-auto-deref
----
- plugins/rust/examples/ramdisk.rs | 2 +-
- plugins/rust/tests/bare_bones.rs | 6 +++---
- plugins/rust/tests/full_featured.rs | 6 +++---
- 3 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/plugins/rust/examples/ramdisk.rs b/plugins/rust/examples/ramdisk.rs
-index f7d998ca..552d36c6 100644
---- a/plugins/rust/examples/ramdisk.rs
-+++ b/plugins/rust/examples/ramdisk.rs
-@@ -52,7 +52,7 @@ impl Server for RamDisk {
- }
-
- fn open(_readonly: bool) -> Box<dyn Server> {
-- Box::new(RamDisk::default())
-+ Box::<RamDisk>::default()
- }
-
- fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<()> {
-diff --git a/plugins/rust/tests/bare_bones.rs b/plugins/rust/tests/bare_bones.rs
-index ac3c5251..8a09cb57 100644
---- a/plugins/rust/tests/bare_bones.rs
-+++ b/plugins/rust/tests/bare_bones.rs
-@@ -73,7 +73,7 @@ fn with_fixture<F: FnMut(&mut Fixture)>(mut f: F) {
- initialize();
- let _m = MOCK_SERVER_MTX.lock().unwrap();
-
-- let mut mock = Box::new(MockServer::default());
-+ let mut mock = Box::<MockServer>::default();
- mock.expect_get_size()
- .returning(|| Ok(0x4200));
- let mockp = (&mut mock) as *mut Box<MockServer>;
-@@ -83,7 +83,7 @@ fn with_fixture<F: FnMut(&mut 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<F: FnMut(&mut 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 46aad9a4..d5f02e06 100644
---- a/plugins/rust/tests/full_featured.rs
-+++ b/plugins/rust/tests/full_featured.rs
-@@ -105,7 +105,7 @@ fn with_fixture<F: FnMut(&mut Fixture)>(mut f: F) {
- initialize();
- let _m = MOCK_SERVER_MTX.lock().unwrap();
-
-- let mut mock = Box::new(MockServer::default());
-+ let mut mock = Box::<MockServer>::default();
- mock.expect_get_size()
- .returning(|| Ok(0x4200));
- let mockp = (&mut mock) as *mut Box<MockServer>;
-@@ -115,7 +115,7 @@ fn with_fixture<F: FnMut(&mut 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<F: FnMut(&mut 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
---
-GitLab
-