Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
upsuper committed May 12, 2017
1 parent 30fc912 commit 6507ecf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ description = "Run pkg-config from declarative dependencies in Cargo.toml"
keywords = ["pkg-config", "build-dependencies", "build-depends", "manifest", "metadata"]

[dependencies]
error-chain = { version = "0.7.1", default-features = false }
error-chain = { version = "0.10", default-features = false }
pkg-config = "0.3.8"
toml = { version = "0.2", default-features = false }
toml = "0.4"

[dev-dependencies]
lazy_static = "0.2"
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ pub fn probe() -> Result<HashMap<String, Library>> {
format!("Error parsing TOML from {}: {:?}", path.display(), e)
));
let key = "package.metadata.pkg-config";
let meta = try!(toml.lookup(key).ok_or(
format!("No {} in {}", key, path.display())
));
let meta = try!(toml.get("package")
.and_then(|v| v.get("metadata"))
.and_then(|v| v.get("pkg-config"))
.ok_or(format!("No {} in {}", key, path.display())));
let table = try!(meta.as_table().ok_or(
format!("{} not a table in {}", key, path.display())
));
Expand Down

0 comments on commit 6507ecf

Please sign in to comment.