Skip to content

Commit

Permalink
Update toml. (#945)
Browse files Browse the repository at this point in the history
Just keeping up-to-date.
  • Loading branch information
ehuss authored and Dylan-DPC committed May 31, 2019
1 parent 1d3ec7e commit 43ead86
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 15 deletions.
109 changes: 101 additions & 8 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ serde_derive = "1.0"
serde_json = "1.0"
shlex = "0.1"
tempfile = "3.0"
toml = "0.4.8"
toml-query = "0.7"
toml = "0.5.1"
toml-query = "0.9"

# Watch feature
notify = { version = "4.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ impl Config {
} else if index.starts_with("build.") {
self.build.update_value(&index[6..], value);
} else {
self.rest.insert(index, value)?;
self.rest.insert(index, value).map_err(|e| ErrorKind::TomlQueryError(e))?;
}

Ok(())
Expand Down
10 changes: 6 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ pub mod errors {
SerdeJson(serde_json::Error) #[doc = "JSON conversion failed"];
}

links {
TomlQuery(toml_query::error::Error, toml_query::error::ErrorKind) #[doc = "A TomlQuery error"];
}

errors {
/// A subprocess exited with an unsuccessful return code.
Subprocess(message: String, output: std::process::Output) {
Expand All @@ -151,6 +147,12 @@ pub mod errors {
description("Reserved Filename")
display("{} is reserved for internal use", filename.display())
}

/// Error with a TOML file.
TomlQueryError(inner: toml_query::error::Error) {
description("toml_query error")
display("{}", inner)
}
}
}

Expand Down

0 comments on commit 43ead86

Please sign in to comment.