Update to master

This commit is contained in:
Yehuda Katz + Carl Lerche 2014-06-09 12:28:54 -07:00 committed by Tim Carey-Smith
parent e862dd1e2a
commit c041e8ec94
19 changed files with 41 additions and 43 deletions

@ -1 +1 @@
Subproject commit ceae88af087e047309d4cedb971d6ec931fd20b8
Subproject commit ae740b4ba884050eeae5b39048de0c31c6bdef30

@ -1 +1 @@
Subproject commit cf8026d844409c3469891e41edb6044567e41c79
Subproject commit f4299be4b130502650ef6759dedd0aa05d766be5

View File

@ -16,7 +16,7 @@ use cargo::ops;
use cargo::util::important_paths::find_project;
use cargo::util::ToCLI;
#[deriving(Eq,Clone,Decodable,Encodable)]
#[deriving(PartialEq,Clone,Decodable,Encodable)]
pub struct Options {
manifest_path: Option<String>
}

View File

@ -11,7 +11,7 @@ use cargo::core::source::Source;
use cargo::sources::git::{GitSource,GitRemote};
use url::Url;
#[deriving(Eq,Clone,Decodable)]
#[deriving(PartialEq,Clone,Decodable)]
struct Options {
database_path: String,
checkout_path: String,

View File

@ -10,7 +10,7 @@ use cargo::{execute_main_without_stdin,CLIResult,CLIError};
use cargo::core::Package;
use cargo::ops;
#[deriving(Eq,Clone,Decodable)]
#[deriving(PartialEq,Clone,Decodable)]
struct Options {
manifest_path: String
}

View File

@ -4,7 +4,6 @@ extern crate cargo;
extern crate toml;
extern crate hammer;
extern crate serialize;
extern crate collections;
#[phase(syntax, link)]
extern crate log;
@ -67,7 +66,7 @@ fn process(args: Vec<String>) -> CLIResult<(String, Vec<String>)> {
#[deriving(Encodable)]
struct ConfigOut {
values: collections::HashMap<String, config::ConfigValue>
values: std::collections::HashMap<String, config::ConfigValue>
}
#[deriving(Decodable)]
@ -90,7 +89,7 @@ fn config_for_key(args: ConfigForKeyFlags) -> CLIResult<Option<ConfigOut>> {
println!("{}", value);
Ok(None)
} else {
let mut map = collections::HashMap::new();
let mut map = std::collections::HashMap::new();
map.insert(args.key.clone(), value);
Ok(Some(ConfigOut { values: map }))
}

View File

@ -2,7 +2,7 @@ use semver::Version;
use core::{VersionReq};
use util::CargoResult;
#[deriving(Eq,Clone,Show)]
#[deriving(PartialEq,Clone,Show)]
pub struct Dependency {
name: String,
req: VersionReq
@ -39,7 +39,7 @@ impl Dependency {
}
}
#[deriving(Eq,Clone,Encodable)]
#[deriving(PartialEq,Clone,Encodable)]
pub struct SerializedDependency {
name: String,
req: String

View File

@ -1,6 +1,6 @@
use std::fmt;
use std::fmt::{Show,Formatter};
use collections::HashMap;
use std::collections::HashMap;
use semver::Version;
use serialize::{Encoder,Encodable};
use core::{
@ -12,7 +12,7 @@ use core::{
use core::dependency::SerializedDependency;
use util::CargoResult;
#[deriving(Eq,Clone)]
#[deriving(PartialEq,Clone)]
pub struct Manifest {
summary: Summary,
authors: Vec<String>,
@ -26,7 +26,7 @@ impl Show for Manifest {
}
}
#[deriving(Eq,Clone,Encodable)]
#[deriving(PartialEq,Clone,Encodable)]
pub struct SerializedManifest {
name: String,
version: String,
@ -49,13 +49,13 @@ impl<E, S: Encoder<E>> Encodable<S, E> for Manifest {
}
}
#[deriving(Show,Clone,Eq,Encodable)]
#[deriving(Show,Clone,PartialEq,Encodable)]
pub enum TargetKind {
LibTarget,
BinTarget
}
#[deriving(Clone,Eq)]
#[deriving(Clone,PartialEq)]
pub struct Target {
kind: TargetKind,
name: String,
@ -181,7 +181,7 @@ impl Target {
type TomlLibTarget = TomlTarget;
type TomlBinTarget = TomlTarget;
#[deriving(Decodable,Encodable,Eq,Clone,Show)]
#[deriving(Decodable,Encodable,PartialEq,Clone,Show)]
pub struct Project {
pub name: String,
pub version: String,
@ -192,7 +192,7 @@ pub struct Project {
* TODO: Make all struct fields private
*/
#[deriving(Decodable,Encodable,Eq,Clone)]
#[deriving(Decodable,Encodable,PartialEq,Clone)]
pub struct TomlManifest {
project: Box<Project>,
lib: Option<~[TomlLibTarget]>,
@ -242,7 +242,7 @@ impl Project {
}
}
#[deriving(Decodable,Encodable,Eq,Clone,Show)]
#[deriving(Decodable,Encodable,PartialEq,Clone,Show)]
struct TomlTarget {
name: String,
path: Option<String>

View File

@ -8,7 +8,7 @@ use serialize::{
Decoder
};
#[deriving(Clone,Eq,Ord)]
#[deriving(Clone,PartialEq,PartialOrd)]
pub struct NameVer {
name: String,
version: semver::Version

View File

@ -15,7 +15,7 @@ use core::dependency::SerializedDependency;
use util::graph;
use serialize::{Encoder,Encodable};
#[deriving(Clone,Eq)]
#[deriving(Clone,PartialEq)]
pub struct Package {
// The package's manifest
manifest: Manifest,
@ -109,7 +109,7 @@ impl Show for Package {
}
}
#[deriving(Eq,Clone,Show)]
#[deriving(PartialEq,Clone,Show)]
pub struct PackageSet {
packages: Vec<Package>
}

View File

@ -1,4 +1,4 @@
use collections::HashMap;
use std::collections::HashMap;
use core::{
Dependency,
NameVer,

View File

@ -4,7 +4,7 @@ use core::{
NameVer
};
#[deriving(Show,Clone,Eq)]
#[deriving(Show,Clone,PartialEq)]
pub struct Summary {
name_ver: NameVer,
dependencies: Vec<Dependency>

View File

@ -6,12 +6,12 @@ use std::str::CharOffsets;
use semver::Version;
use util::{other_error,CargoResult};
#[deriving(Eq,Clone)]
#[deriving(PartialEq,Clone)]
pub struct VersionReq {
predicates: Vec<Predicate>
}
#[deriving(Eq,Clone)]
#[deriving(PartialEq,Clone)]
enum Op {
Ex, // Exact
Gt, // Greater than
@ -20,7 +20,7 @@ enum Op {
LtEq // Less than or equal to
}
#[deriving(Eq,Clone)]
#[deriving(PartialEq,Clone)]
struct Predicate {
op: Op,
major: uint,
@ -225,7 +225,7 @@ struct Lexer<'a> {
state: LexState
}
#[deriving(Show,Eq)]
#[deriving(Show,PartialEq)]
enum LexState {
LexInit,
LexStart,

View File

@ -4,7 +4,6 @@
#![allow(deprecated_owned_vector)]
#![feature(macro_rules,phase)]
extern crate collections;
extern crate term;
extern crate url;
extern crate serialize;

View File

@ -7,7 +7,7 @@ use std::io::{UserDir,AllPermissions};
use std::io::fs::{mkdir_recursive,rmdir_recursive,chmod};
use serialize::{Encodable,Encoder};
#[deriving(Eq,Clone,Encodable)]
#[deriving(PartialEq,Clone,Encodable)]
pub enum GitReference {
Master,
Other(String)
@ -67,13 +67,13 @@ macro_rules! errln(
* GitRemote represents a remote repository. It gets cloned into a local GitDatabase.
*/
#[deriving(Eq,Clone)]
#[deriving(PartialEq,Clone)]
pub struct GitRemote {
url: Url,
verbose: bool
}
#[deriving(Eq,Clone,Encodable)]
#[deriving(PartialEq,Clone,Encodable)]
struct EncodableGitRemote {
url: String
}
@ -91,7 +91,7 @@ impl<E, S: Encoder<E>> Encodable<S, E> for GitRemote {
* can be cloned from this GitDatabase.
*/
#[deriving(Eq,Clone)]
#[deriving(PartialEq,Clone)]
pub struct GitDatabase {
remote: GitRemote,
path: Path,

View File

@ -1,16 +1,16 @@
use std::{io,fmt};
use collections::HashMap;
use std::collections::HashMap;
use serialize::{Encodable,Encoder};
use toml;
use util::{other_error,CargoResult,Require};
#[deriving(Eq,TotalEq,Clone,Encodable,Decodable)]
#[deriving(Eq,PartialEq,Clone,Encodable,Decodable)]
pub enum Location {
Project,
Global
}
#[deriving(Eq,TotalEq,Clone,Decodable)]
#[deriving(Eq,PartialEq,Clone,Decodable)]
pub enum ConfigValueValue {
String(String),
List(Vec<String>)
@ -40,7 +40,7 @@ impl<E, S: Encoder<E>> Encodable<S, E> for ConfigValueValue {
}
}
#[deriving(Eq,TotalEq,Clone,Decodable)]
#[deriving(Eq,PartialEq,Clone,Decodable)]
pub struct ConfigValue {
value: ConfigValueValue,
path: Vec<Path>

View File

@ -1,5 +1,5 @@
use std::hash::Hash;
use collections::HashMap;
use std::collections::HashMap;
pub struct Graph<N> {
nodes: HashMap<N, ~[N]>
@ -10,7 +10,7 @@ enum Mark {
Done
}
impl<N: TotalEq + Hash + Clone> Graph<N> {
impl<N: Eq + Hash + Clone> Graph<N> {
pub fn new() -> Graph<N> {
Graph { nodes: HashMap::new() }
}

View File

@ -4,9 +4,9 @@ use std::os;
use std::path::Path;
use std::io::process::{Command,ProcessOutput,InheritFd};
use util::{CargoResult,io_error,process_error};
use collections::HashMap;
use std::collections::HashMap;
#[deriving(Clone,Eq)]
#[deriving(Clone,PartialEq)]
pub struct ProcessBuilder {
program: String,
args: Vec<String>,

View File

@ -69,7 +69,7 @@ pub fn toml_error(desc: &'static str, error: toml::Error) -> CargoError {
}
}
#[deriving(Eq,Clone)]
#[deriving(PartialEq,Clone)]
pub struct CargoError {
pub kind: CargoErrorKind,
desc: CargoErrorDescription,
@ -86,7 +86,7 @@ impl Show for CargoError {
}
}
#[deriving(Eq,Show,Clone)]
#[deriving(PartialEq,Show,Clone)]
enum CargoErrorDescription {
StaticDescription(&'static str),
BoxedDescription(String)
@ -127,7 +127,7 @@ impl CargoError {
}
}
#[deriving(Eq)]
#[deriving(PartialEq)]
pub enum CargoErrorKind {
HumanReadableError,
InternalError,