Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

Commit 74fcb51

Browse files
pcwaltontomaka
authored andcommitted
Upgrade Cargo dependency from 0.20 to 0.32. (#189)
This upgrade allows this tool to package crates that use the 2018 Rust edition.
1 parent 1412966 commit 74fcb51

File tree

9 files changed

+1462
-547
lines changed

9 files changed

+1462
-547
lines changed

cargo-apk/Cargo.lock

Lines changed: 860 additions & 291 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cargo-apk/Cargo.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
[package]
22
name = "cargo-apk"
3-
version = "0.4.2"
3+
version = "0.4.3"
44
authors = ["Pierre Krieger <[email protected]>"]
55
license = "MIT"
66
description = "Cargo subcommand that allows you to build Android packages"
77
repository = "https://github.com/tomaka/android-rs-glue/tree/master/cargo-apk"
88

99
[dependencies]
10-
cargo = "0.20.0"
10+
clap = "2.31"
11+
failure = "0.1.2"
1112
rustc-serialize = "0.3.19"
1213
term = "0.4.4"
1314
toml = "0.1.28"
15+
16+
[dependencies.cargo]
17+
git = "https://github.com/rust-lang/cargo.git"
18+
rev = "aab0a3385932c8f5453c4fcd69e23c82bbc1c921"

cargo-apk/src/config.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,17 @@ pub fn load(workspace: &Workspace, flag_package: &Option<String>) -> Result<Andr
8181
// Find out the package requested by the user.
8282
let package = {
8383
let packages = Vec::from_iter(flag_package.iter().cloned());
84-
let spec = ops::Packages::Packages(&packages);
84+
let spec = ops::Packages::Packages(packages);
8585

8686
match spec {
87+
ops::Packages::Default => unreachable!("cargo apk supports single package only"),
8788
ops::Packages::All => unreachable!("cargo apk supports single package only"),
8889
ops::Packages::OptOut(_) => unreachable!("cargo apk supports single package only"),
8990
ops::Packages::Packages(xs) => match xs.len() {
9091
0 => workspace.current()?,
9192
1 => workspace.members()
92-
.find(|pkg| pkg.name() == xs[0])
93-
.ok_or_else(|| CargoError::from(format!("package `{}` is not a member of the workspace", xs[0])))?,
93+
.find(|pkg| *pkg.name() == xs[0])
94+
.ok_or_else(|| format_err!("package `{}` is not a member of the workspace", xs[0]))?,
9495
_ => unreachable!("cargo apk supports single package only"),
9596
}
9697
}

0 commit comments

Comments
 (0)