File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed
Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -22,19 +22,19 @@ serde_json = "0.9"
2222pulldown-cmark = " 0.0.8"
2323log = " 0.3"
2424env_logger = " 0.4.0"
25- toml = { version = " 0.2 " , features = [" serde" ] }
25+ toml = { version = " 0.3 " , features = [" serde" ] }
2626open = " 1.1"
2727regex = " 0.2.1"
2828
2929# Watch feature
30- notify = { version = " 3 .0" , optional = true }
30+ notify = { version = " 4 .0" , optional = true }
3131time = { version = " 0.1.34" , optional = true }
3232crossbeam = { 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 ]
Original file line number Diff line number Diff 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 } ;
You can’t perform that action at this time.
0 commit comments