Skip to content

Commit 14a2808

Browse files
authored
Merge pull request #208 from frewsxcv/bump
Bump crates.
2 parents d7f38d0 + 7fa36f8 commit 14a2808

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ serde_json = "0.9"
2222
pulldown-cmark = "0.0.8"
2323
log = "0.3"
2424
env_logger = "0.4.0"
25-
toml = { version = "0.2", features = ["serde"] }
25+
toml = { version = "0.3", features = ["serde"] }
2626
open = "1.1"
2727
regex = "0.2.1"
2828

2929
# Watch feature
30-
notify = { version = "3.0", optional = true }
30+
notify = { version = "4.0", optional = true }
3131
time = { version = "0.1.34", optional = true }
3232
crossbeam = { version = "0.2.8", optional = true }
3333

3434
# Serve feature
35-
iron = { version = "0.4", optional = true }
36-
staticfile = { version = "0.3", optional = true }
37-
ws = { version = "0.5.1", optional = true}
35+
iron = { version = "0.5", optional = true }
36+
staticfile = { version = "0.4", optional = true }
37+
ws = { version = "0.6", optional = true}
3838

3939
# Tests
4040
[dev-dependencies]

src/book/bookconfig.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,10 @@ impl BookConfig {
8282
}
8383

8484
pub fn parse_from_toml_string(&mut self, data: &str) -> &mut Self {
85-
86-
let mut parser = toml::Parser::new(data);
87-
88-
let config = match parser.parse() {
89-
Some(x) => {x},
90-
None => {
91-
error!("[*]: Toml parse errors in book.toml: {:?}", parser.errors);
85+
let config = match toml::from_str(data) {
86+
Ok(x) => {x},
87+
Err(e) => {
88+
error!("[*]: Toml parse errors in book.toml: {:?}", e);
9289
exit(2);
9390
}
9491
};

0 commit comments

Comments
 (0)