Remove redundant extern crate imports

This commit is contained in:
timvisee 2020-10-26 12:32:54 +01:00
parent 65306a30e8
commit 549657df21
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
8 changed files with 14 additions and 27 deletions

View file

@ -289,7 +289,7 @@ impl<'a> Upload<'a> {
// Prompt the user to continue, quit if the user answered no
if !prompt_yes("Continue uploading?", Some(true), &matcher_main) {
println!("Upload cancelled");
eprintln!("Upload cancelled");
quit();
}
}

View file

@ -1,7 +1,7 @@
use std::io::{Error as IoError, Read};
use std::path::Path;
use super::tar::Archive as TarArchive;
use tar::Archive as TarArchive;
pub type Result<T> = ::std::result::Result<T, IoError>;

View file

@ -2,7 +2,7 @@ use std::fs::File;
use std::io::{Error as IoError, Write};
use std::path::Path;
use super::tar::Builder as TarBuilder;
use tar::Builder as TarBuilder;
pub type Result<T> = ::std::result::Result<T, IoError>;

View file

@ -1,4 +1,2 @@
extern crate tar;
pub mod archive;
pub mod archiver;

View file

@ -1,5 +1,3 @@
extern crate directories;
#[cfg(feature = "infer-command")]
use std::ffi::OsString;

View file

@ -1,16 +1,14 @@
extern crate toml;
extern crate version_compare;
use std::fs;
use std::io::Error as IoError;
use std::path::PathBuf;
use self::toml::de::Error as DeError;
use self::toml::ser::Error as SerError;
use self::version_compare::{CompOp, VersionCompare};
use failure::Fail;
use ffsend_api::file::remote_file::{FileParseError, RemoteFile};
use ffsend_api::url::Url;
use ffsend_api::{
file::remote_file::{FileParseError, RemoteFile},
url::Url,
};
use toml::{de::Error as DeError, ser::Error as SerError};
use version_compare::{CompOp, VersionCompare};
use crate::util::{print_error, print_warning};

View file

@ -1,10 +1,8 @@
extern crate pbr;
use std::io::{stderr, Stderr};
use std::time::Duration;
use self::pbr::{ProgressBar as Pbr, Units};
use ffsend_api::pipe::ProgressReporter;
use pbr::{ProgressBar as Pbr, Units};
/// The refresh rate of the progress bar, in milliseconds.
const PROGRESS_BAR_FPS_MILLIS: u64 = 200;

View file

@ -1,10 +1,5 @@
#[cfg(feature = "clipboard-crate")]
extern crate clip;
extern crate colored;
extern crate directories;
extern crate fs2;
extern crate open;
extern crate regex;
#[cfg(feature = "clipboard-bin")]
extern crate which;
@ -26,11 +21,10 @@ use std::process::{Command, Stdio};
#[cfg(feature = "clipboard-crate")]
use self::clip::{ClipboardContext, ClipboardProvider};
use self::colored::*;
#[cfg(feature = "history")]
use self::directories::ProjectDirs;
use self::fs2::available_space;
use chrono::Duration;
use colored::*;
#[cfg(feature = "history")]
use directories::ProjectDirs;
use failure::{err_msg, Fail};
#[cfg(feature = "clipboard-crate")]
use failure::{Compat, Error};
@ -40,6 +34,7 @@ use ffsend_api::{
reqwest,
url::Url,
};
use fs2::available_space;
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
use regex::Regex;