mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Remove unused imports
This commit is contained in:
parent
d6fa260d1a
commit
45ad3f9986
@ -11,7 +11,6 @@ use anyhow::{bail, Result};
|
||||
use curl::easy::{Easy, List};
|
||||
use percent_encoding::{percent_encode, NON_ALPHANUMERIC};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json;
|
||||
use url::Url;
|
||||
|
||||
pub struct Registry {
|
||||
|
@ -1,9 +1,6 @@
|
||||
use clap;
|
||||
|
||||
use clap::{AppSettings, Arg, ArgMatches};
|
||||
|
||||
use cargo::core::features;
|
||||
use cargo::{self, CliResult, Config};
|
||||
use clap::{AppSettings, Arg, ArgMatches};
|
||||
|
||||
use super::commands;
|
||||
use super::list_commands;
|
||||
|
@ -6,7 +6,6 @@ use std::path::Path;
|
||||
use std::ptr;
|
||||
use std::sync::Mutex;
|
||||
|
||||
use semver;
|
||||
use serde::de;
|
||||
use serde::ser;
|
||||
|
||||
|
@ -4,7 +4,6 @@ use crate::core::{Dependency, PackageId, Registry, Summary};
|
||||
use crate::util::lev_distance::lev_distance;
|
||||
use crate::util::Config;
|
||||
use anyhow::Error;
|
||||
use semver;
|
||||
|
||||
use super::context::Context;
|
||||
use super::types::{ConflictMap, ConflictReason};
|
||||
|
@ -3,7 +3,6 @@ use crate::core::interning::InternedString;
|
||||
use crate::core::{Dependency, PackageId, Summary};
|
||||
use crate::util::errors::CargoResult;
|
||||
use crate::util::Config;
|
||||
use im_rc;
|
||||
use std::cmp::Ordering;
|
||||
use std::collections::{BTreeMap, BTreeSet};
|
||||
use std::ops::Range;
|
||||
|
@ -1,7 +1,6 @@
|
||||
use std::fmt;
|
||||
use std::io::prelude::*;
|
||||
|
||||
use atty;
|
||||
use termcolor::Color::{Cyan, Green, Red, Yellow};
|
||||
use termcolor::{self, Color, ColorSpec, StandardStream, WriteColor};
|
||||
|
||||
@ -382,11 +381,8 @@ impl ColorChoice {
|
||||
|
||||
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd"))]
|
||||
mod imp {
|
||||
use std::mem;
|
||||
|
||||
use libc;
|
||||
|
||||
use super::Shell;
|
||||
use std::mem;
|
||||
|
||||
pub fn stderr_width() -> Option<usize> {
|
||||
unsafe {
|
||||
|
@ -15,8 +15,6 @@ use std::path::{Path, PathBuf};
|
||||
use std::process::Command;
|
||||
use std::str::{from_utf8, FromStr};
|
||||
|
||||
use toml;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum VersionControl {
|
||||
Git,
|
||||
|
@ -1,7 +1,5 @@
|
||||
use std::io::prelude::*;
|
||||
|
||||
use toml;
|
||||
|
||||
use crate::core::{resolver, Resolve, ResolveVersion, Workspace};
|
||||
use crate::util::errors::{CargoResult, CargoResultExt};
|
||||
use crate::util::toml as cargo_toml;
|
||||
|
@ -4,8 +4,6 @@ use std::io::{Read, Seek, SeekFrom, Write};
|
||||
use std::path::{Display, Path, PathBuf};
|
||||
|
||||
use fs2::{lock_contended_error, FileExt};
|
||||
#[allow(unused_imports)]
|
||||
use libc;
|
||||
use termcolor::Color::Cyan;
|
||||
#[cfg(windows)]
|
||||
use winapi::shared::winerror::ERROR_INVALID_FUNCTION;
|
||||
|
@ -2,8 +2,6 @@ use std::borrow::Borrow;
|
||||
use std::collections::BTreeSet;
|
||||
use std::fmt;
|
||||
|
||||
use im_rc;
|
||||
|
||||
pub struct Graph<N: Clone, E: Clone> {
|
||||
nodes: im_rc::OrdMap<N, im_rc::OrdMap<N, E>>,
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![allow(deprecated)]
|
||||
|
||||
use hex;
|
||||
use std::hash::{Hash, Hasher, SipHasher};
|
||||
|
||||
pub fn to_hex(num: u64) -> String {
|
||||
|
@ -23,7 +23,6 @@ pub fn setup() -> Option<Setup> {
|
||||
|
||||
#[cfg(unix)]
|
||||
mod imp {
|
||||
use libc;
|
||||
use std::env;
|
||||
|
||||
pub type Setup = ();
|
||||
|
@ -1,6 +1,3 @@
|
||||
use curl;
|
||||
use git2;
|
||||
|
||||
use anyhow::Error;
|
||||
|
||||
use crate::util::errors::{CargoResult, HttpNot200};
|
||||
|
@ -2,7 +2,6 @@ pub use self::imp::read2;
|
||||
|
||||
#[cfg(unix)]
|
||||
mod imp {
|
||||
use libc;
|
||||
use std::io;
|
||||
use std::io::prelude::*;
|
||||
use std::mem;
|
||||
|
@ -1,6 +1,5 @@
|
||||
use self::crypto_hash::{Algorithm, Hasher};
|
||||
use crate::util::{CargoResult, CargoResultExt};
|
||||
use crypto_hash;
|
||||
use crypto_hash::{Algorithm, Hasher};
|
||||
use std::fs::File;
|
||||
use std::io::{self, Read, Write};
|
||||
use std::path::Path;
|
||||
|
@ -1,6 +1,5 @@
|
||||
use crate::util::paths;
|
||||
use crate::util::{process, CargoResult};
|
||||
use git2;
|
||||
use std::path::Path;
|
||||
|
||||
// Check if we are in an existing repo. We define that to be true if either:
|
||||
|
Loading…
x
Reference in New Issue
Block a user