Skip to content

Commit b3ce593

Browse files
committed
auto merge of #907 : alexcrichton/cargo/update-curl, r=alexcrichton
2 parents df02f29 + 38d14a5 commit b3ce593

31 files changed

+427
-399
lines changed

Cargo.lock

+48-28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bin/run.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::io::process::ExitStatus;
22

33
use cargo::ops;
44
use cargo::core::{MultiShell};
5-
use cargo::core::manifest::{BinTarget, ExampleTarget};
5+
use cargo::core::manifest::TargetKind;
66
use cargo::util::{CliResult, CliError, human};
77
use cargo::util::important_paths::{find_root_manifest_for_cwd};
88

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

7373
let (target_kind, name) = match (options.flag_bin, options.flag_example) {
74-
(Some(bin), None) => (BinTarget, Some(bin)),
75-
(None, Some(example)) => (ExampleTarget, Some(example)),
76-
(None, None) => (BinTarget, None),
74+
(Some(bin), None) => (TargetKind::Bin, Some(bin)),
75+
(None, Some(example)) => (TargetKind::Example, Some(example)),
76+
(None, None) => (TargetKind::Bin, None),
7777
(Some(_), Some(_)) => return Err(CliError::from_boxed(
7878
human("specify either `--bin` or `--example`, not both"), 1)),
7979
};

src/cargo/core/dependency.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl Dependency {
6262
name: name.to_string(),
6363
source_id: source_id.clone(),
6464
req: VersionReq::any(),
65-
kind: Normal,
65+
kind: Kind::Normal,
6666
only_match_name: true,
6767
optional: false,
6868
features: Vec::new(),
@@ -141,12 +141,12 @@ impl Dependency {
141141
/// Returns false if the dependency is only used to build the local package.
142142
pub fn is_transitive(&self) -> bool {
143143
match self.kind {
144-
Normal | Build => true,
145-
Development => false,
144+
Kind::Normal | Kind::Build => true,
145+
Kind::Development => false,
146146
}
147147
}
148148
pub fn is_build(&self) -> bool {
149-
match self.kind { Build => true, _ => false }
149+
match self.kind { Kind::Build => true, _ => false }
150150
}
151151
pub fn is_optional(&self) -> bool { self.optional }
152152
/// Returns true if the default features of the dependency are requested.

0 commit comments

Comments
 (0)