mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-14 06:42:35 +00:00
Bump toml crate to 0.3.
This commit is contained in:
parent
d7f38d08fd
commit
cfa4295d79
2 changed files with 5 additions and 8 deletions
|
@ -22,7 +22,7 @@ serde_json = "0.9"
|
|||
pulldown-cmark = "0.0.8"
|
||||
log = "0.3"
|
||||
env_logger = "0.4.0"
|
||||
toml = { version = "0.2", features = ["serde"] }
|
||||
toml = { version = "0.3", features = ["serde"] }
|
||||
open = "1.1"
|
||||
regex = "0.2.1"
|
||||
|
||||
|
|
|
@ -82,13 +82,10 @@ impl BookConfig {
|
|||
}
|
||||
|
||||
pub fn parse_from_toml_string(&mut self, data: &str) -> &mut Self {
|
||||
|
||||
let mut parser = toml::Parser::new(data);
|
||||
|
||||
let config = match parser.parse() {
|
||||
Some(x) => {x},
|
||||
None => {
|
||||
error!("[*]: Toml parse errors in book.toml: {:?}", parser.errors);
|
||||
let config = match toml::from_str(data) {
|
||||
Ok(x) => {x},
|
||||
Err(e) => {
|
||||
error!("[*]: Toml parse errors in book.toml: {:?}", e);
|
||||
exit(2);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue