Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some unnecessary "extern crate" statements #4721

Merged
merged 1 commit into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/uu/sync/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"))]
Expand Down
1 change: 0 additions & 1 deletion src/uucore/src/lib/features/fsext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion src/uucore/src/lib/features/utmpx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/uucore/src/lib/mods/backup_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
1 change: 0 additions & 1 deletion src/uucore_procs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (C) ~ Roy Ivy III <[email protected]>; MIT license
// spell-checker:ignore backticks

extern crate proc_macro;
use std::{fs::File, io::Read, path::PathBuf};

use proc_macro::{Literal, TokenStream, TokenTree};
Expand Down