Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all dependencies to Rust master #907

Merged
merged 1 commit into from
Nov 19, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 48 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/bin/run.rs
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ use std::io::process::ExitStatus;

use cargo::ops;
use cargo::core::{MultiShell};
use cargo::core::manifest::{BinTarget, ExampleTarget};
use cargo::core::manifest::TargetKind;
use cargo::util::{CliResult, CliError, human};
use cargo::util::important_paths::{find_root_manifest_for_cwd};

@@ -71,9 +71,9 @@ pub fn execute(options: Options, shell: &mut MultiShell) -> CliResult<Option<()>
};

let (target_kind, name) = match (options.flag_bin, options.flag_example) {
(Some(bin), None) => (BinTarget, Some(bin)),
(None, Some(example)) => (ExampleTarget, Some(example)),
(None, None) => (BinTarget, None),
(Some(bin), None) => (TargetKind::Bin, Some(bin)),
(None, Some(example)) => (TargetKind::Example, Some(example)),
(None, None) => (TargetKind::Bin, None),
(Some(_), Some(_)) => return Err(CliError::from_boxed(
human("specify either `--bin` or `--example`, not both"), 1)),
};
8 changes: 4 additions & 4 deletions src/cargo/core/dependency.rs
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ impl Dependency {
name: name.to_string(),
source_id: source_id.clone(),
req: VersionReq::any(),
kind: Normal,
kind: Kind::Normal,
only_match_name: true,
optional: false,
features: Vec::new(),
@@ -141,12 +141,12 @@ impl Dependency {
/// Returns false if the dependency is only used to build the local package.
pub fn is_transitive(&self) -> bool {
match self.kind {
Normal | Build => true,
Development => false,
Kind::Normal | Kind::Build => true,
Kind::Development => false,
}
}
pub fn is_build(&self) -> bool {
match self.kind { Build => true, _ => false }
match self.kind { Kind::Build => true, _ => false }
}
pub fn is_optional(&self) -> bool { self.optional }
/// Returns true if the default features of the dependency are requested.
Loading