Now that we don't use C-style fixed-sized integers, there is no need for libc
any more.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
plugins/rust/Cargo.toml.in | 1 -
plugins/rust/examples/ramdisk.rs | 3 +--
plugins/rust/src/lib.rs | 5 +----
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/plugins/rust/Cargo.toml.in b/plugins/rust/Cargo.toml.in
index f7a9f41e2402..bb20adabda18 100644
--- a/plugins/rust/Cargo.toml.in
+++ b/plugins/rust/Cargo.toml.in
@@ -5,7 +5,6 @@ authors = ["Richard W.M. Jones <rjones(a)redhat.com>"]
edition = "2018"
[dependencies]
-libc = "0.2"
# lazy_static is used by the example.
lazy_static = "1.2.0"
diff --git a/plugins/rust/examples/ramdisk.rs b/plugins/rust/examples/ramdisk.rs
index caf6fc8d8455..9d0af0eeddef 100644
--- a/plugins/rust/examples/ramdisk.rs
+++ b/plugins/rust/examples/ramdisk.rs
@@ -34,9 +34,8 @@ extern crate nbdkit;
#[macro_use]
extern crate lazy_static;
-use libc::*;
use std::ptr;
-use std::os::raw::c_int;
+use std::os::raw::{c_char, c_int, c_void};
use std::sync::Mutex;
use nbdkit::*;
diff --git a/plugins/rust/src/lib.rs b/plugins/rust/src/lib.rs
index ea68e8a701d2..a3dbf43e1ae1 100644
--- a/plugins/rust/src/lib.rs
+++ b/plugins/rust/src/lib.rs
@@ -29,11 +29,8 @@
// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE.
-extern crate libc;
-
-use libc::*;
-use std::os::raw::c_int;
use std::mem;
+use std::os::raw::{c_char, c_int, c_void};
// This struct describes the plugin ABI which your plugin_init()
// function must return.
--
2.21.0