From 4355fb7f781a37942a4917c95c351452ed0e188e Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Sun, 9 Apr 2023 14:46:11 +0200 Subject: [PATCH] Remove some unnecessary "extern crate" statements --- src/uu/sync/src/sync.rs | 3 --- src/uucore/src/lib/features/fsext.rs | 1 - src/uucore/src/lib/features/utmpx.rs | 1 - src/uucore/src/lib/mods/backup_control.rs | 2 -- src/uucore_procs/src/lib.rs | 1 - 5 files changed, 8 deletions(-) diff --git a/src/uu/sync/src/sync.rs b/src/uu/sync/src/sync.rs index d4bc1604d..120e31dfe 100644 --- a/src/uu/sync/src/sync.rs +++ b/src/uu/sync/src/sync.rs @@ -7,8 +7,6 @@ /* Last synced with: sync (GNU coreutils) 8.13 */ -extern crate libc; - use clap::{crate_version, Arg, ArgAction, Command}; #[cfg(any(target_os = "linux", target_os = "android"))] use nix::errno::Errno; @@ -34,7 +32,6 @@ static ARG_FILES: &str = "files"; #[cfg(unix)] mod platform { - use super::libc; #[cfg(any(target_os = "linux", target_os = "android"))] use std::fs::File; #[cfg(any(target_os = "linux", target_os = "android"))] diff --git a/src/uucore/src/lib/features/fsext.rs b/src/uucore/src/lib/features/fsext.rs index e7d5d66bf..1e7f84e6a 100644 --- a/src/uucore/src/lib/features/fsext.rs +++ b/src/uucore/src/lib/features/fsext.rs @@ -11,7 +11,6 @@ // spell-checker:ignore DATETIME subsecond (arch) bitrig ; (fs) cifs smbfs -extern crate time; use time::macros::format_description; use time::UtcOffset; diff --git a/src/uucore/src/lib/features/utmpx.rs b/src/uucore/src/lib/features/utmpx.rs index 27519f288..35c5ac5b0 100644 --- a/src/uucore/src/lib/features/utmpx.rs +++ b/src/uucore/src/lib/features/utmpx.rs @@ -227,7 +227,6 @@ impl Utmpx { let (hostname, display) = host.split_once(':').unwrap_or((&host, "")); if !hostname.is_empty() { - extern crate dns_lookup; use dns_lookup::{getaddrinfo, AddrInfoHints}; const AI_CANONNAME: i32 = 0x2; diff --git a/src/uucore/src/lib/mods/backup_control.rs b/src/uucore/src/lib/mods/backup_control.rs index 52b2771c6..2d161c43f 100644 --- a/src/uucore/src/lib/mods/backup_control.rs +++ b/src/uucore/src/lib/mods/backup_control.rs @@ -200,8 +200,6 @@ impl Display for BackupError { pub mod arguments { use clap::ArgAction; - extern crate clap; - pub static OPT_BACKUP: &str = "backupopt_backup"; pub static OPT_BACKUP_NO_ARG: &str = "backupopt_b"; pub static OPT_SUFFIX: &str = "backupopt_suffix"; diff --git a/src/uucore_procs/src/lib.rs b/src/uucore_procs/src/lib.rs index ab2458ceb..124978f93 100644 --- a/src/uucore_procs/src/lib.rs +++ b/src/uucore_procs/src/lib.rs @@ -1,7 +1,6 @@ // Copyright (C) ~ Roy Ivy III ; MIT license // spell-checker:ignore backticks -extern crate proc_macro; use std::{fs::File, io::Read, path::PathBuf}; use proc_macro::{Literal, TokenStream, TokenTree};