From 81b1bc1fa7b5c8c8bf7da3b324bf36115683634c Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Sat, 8 Apr 2023 16:34:29 +0200 Subject: [PATCH] touch: remove unnecessary "extern crate"s --- src/uu/touch/src/touch.rs | 4 ++-- tests/by-util/test_touch.rs | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/uu/touch/src/touch.rs b/src/uu/touch/src/touch.rs index 5b30ba400..eeb1dd13a 100644 --- a/src/uu/touch/src/touch.rs +++ b/src/uu/touch/src/touch.rs @@ -7,11 +7,10 @@ // that was distributed with this source code. // spell-checker:ignore (ToDO) filetime strptime utcoff strs datetime MMDDhhmm clapv PWSTR lpszfilepath hresult mktime YYYYMMDDHHMM YYMMDDHHMM DATETIME YYYYMMDDHHMMS subsecond -pub extern crate filetime; use clap::builder::ValueParser; use clap::{crate_version, Arg, ArgAction, ArgGroup, Command}; -use filetime::*; +use filetime::{set_symlink_file_times, FileTime}; use std::ffi::OsString; use std::fs::{self, File}; use std::path::{Path, PathBuf}; @@ -23,6 +22,7 @@ use uucore::{format_usage, help_about, help_usage, show}; const ABOUT: &str = help_about!("touch.md"); const USAGE: &str = help_usage!("touch.md"); + pub mod options { // Both SOURCES and sources are needed as we need to be able to refer to the ArgGroup. pub static SOURCES: &str = "sources"; diff --git a/tests/by-util/test_touch.rs b/tests/by-util/test_touch.rs index b21f95645..ae3a28e49 100644 --- a/tests/by-util/test_touch.rs +++ b/tests/by-util/test_touch.rs @@ -6,10 +6,8 @@ // See https://github.com/time-rs/time/issues/293#issuecomment-946382614= // Defined in .cargo/config -extern crate touch; -use self::touch::filetime::{self, FileTime}; +use filetime::FileTime; -extern crate time; use time::macros::format_description; use crate::common::util::{AtPath, TestScenario};