Skip to content

Commit 1ddbfdb

Browse files
committed
Upgrade dependencies
1 parent 30fc912 commit 1ddbfdb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ description = "Run pkg-config from declarative dependencies in Cargo.toml"
99
keywords = ["pkg-config", "build-dependencies", "build-depends", "manifest", "metadata"]
1010

1111
[dependencies]
12-
error-chain = { version = "0.7.1", default-features = false }
12+
error-chain = { version = "0.10", default-features = false }
1313
pkg-config = "0.3.8"
14-
toml = { version = "0.2", default-features = false }
14+
toml = { version = "0.4", default-features = false }
1515

1616
[dev-dependencies]
1717
lazy_static = "0.2"

src/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ pub fn probe() -> Result<HashMap<String, Library>> {
4747
format!("Error parsing TOML from {}: {:?}", path.display(), e)
4848
));
4949
let key = "package.metadata.pkg-config";
50-
let meta = try!(toml.lookup(key).ok_or(
51-
format!("No {} in {}", key, path.display())
52-
));
50+
let meta = try!(toml.get("package")
51+
.and_then(|v| v.get("metadata"))
52+
.and_then(|v| v.get("pkg-config"))
53+
.ok_or(format!("No {} in {}", key, path.display())));
5354
let table = try!(meta.as_table().ok_or(
5455
format!("{} not a table in {}", key, path.display())
5556
));

0 commit comments

Comments
 (0)