1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

touch: remove unnecessary "extern crate"s

This commit is contained in:
Daniel Hofstetter 2023-04-08 16:34:29 +02:00
parent 213bbb8e54
commit 81b1bc1fa7
2 changed files with 3 additions and 5 deletions

View file

@ -7,11 +7,10 @@
// that was distributed with this source code. // 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 // 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::builder::ValueParser;
use clap::{crate_version, Arg, ArgAction, ArgGroup, Command}; use clap::{crate_version, Arg, ArgAction, ArgGroup, Command};
use filetime::*; use filetime::{set_symlink_file_times, FileTime};
use std::ffi::OsString; use std::ffi::OsString;
use std::fs::{self, File}; use std::fs::{self, File};
use std::path::{Path, PathBuf}; 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 ABOUT: &str = help_about!("touch.md");
const USAGE: &str = help_usage!("touch.md"); const USAGE: &str = help_usage!("touch.md");
pub mod options { pub mod options {
// Both SOURCES and sources are needed as we need to be able to refer to the ArgGroup. // Both SOURCES and sources are needed as we need to be able to refer to the ArgGroup.
pub static SOURCES: &str = "sources"; pub static SOURCES: &str = "sources";

View file

@ -6,10 +6,8 @@
// See https://github.com/time-rs/time/issues/293#issuecomment-946382614= // See https://github.com/time-rs/time/issues/293#issuecomment-946382614=
// Defined in .cargo/config // Defined in .cargo/config
extern crate touch; use filetime::FileTime;
use self::touch::filetime::{self, FileTime};
extern crate time;
use time::macros::format_description; use time::macros::format_description;
use crate::common::util::{AtPath, TestScenario}; use crate::common::util::{AtPath, TestScenario};