From cfa4295d79fc231ae673f53f529118c8155670e5 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 18 Feb 2017 20:22:55 -0500 Subject: [PATCH 1/4] Bump toml crate to 0.3. --- Cargo.toml | 2 +- src/book/bookconfig.rs | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7f245977..b44a838d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/book/bookconfig.rs b/src/book/bookconfig.rs index 34ac47d5..53544eb0 100644 --- a/src/book/bookconfig.rs +++ b/src/book/bookconfig.rs @@ -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); } }; From fab24f522417ebff2cc8bace73fb07c75ee9d6e4 Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 18 Feb 2017 20:24:27 -0500 Subject: [PATCH 2/4] Bump notify crate to 0.4. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b44a838d..e4e86d4a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ open = "1.1" regex = "0.2.1" # Watch feature -notify = { version = "3.0", optional = true } +notify = { version = "4.0", optional = true } time = { version = "0.1.34", optional = true } crossbeam = { version = "0.2.8", optional = true } From 3a30e65eef36dff733b2919d482dbdbf9cadc95f Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 18 Feb 2017 20:26:12 -0500 Subject: [PATCH 3/4] Bump staticfile crate to 0.4, iron to 0.5. --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e4e86d4a..ae8f09f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,8 +32,8 @@ time = { version = "0.1.34", optional = true } crossbeam = { version = "0.2.8", optional = true } # Serve feature -iron = { version = "0.4", optional = true } -staticfile = { version = "0.3", optional = true } +iron = { version = "0.5", optional = true } +staticfile = { version = "0.4", optional = true } ws = { version = "0.5.1", optional = true} # Tests From 7fa36f82b0d2423cd24b6b1be208f4ab4cd5694c Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Sat, 18 Feb 2017 20:28:12 -0500 Subject: [PATCH 4/4] Bump ws crate to 0.6. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ae8f09f1..b7700636 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ crossbeam = { version = "0.2.8", optional = true } # Serve feature iron = { version = "0.5", optional = true } staticfile = { version = "0.4", optional = true } -ws = { version = "0.5.1", optional = true} +ws = { version = "0.6", optional = true} # Tests [dev-dependencies]