Merge pull request #4718 from cakebaker/touch_remove_extern_crates

touch: remove unnecessary "extern crate"s
This commit is contained in:
Sylvestre Ledru 2023-04-09 15:09:36 +02:00 committed by GitHub
commit 2f6c505ff2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -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";

View file

@ -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};