File tree 2 files changed +9
-12
lines changed
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"
22
22
pulldown-cmark = " 0.0.8"
23
23
log = " 0.3"
24
24
env_logger = " 0.4.0"
25
- toml = { version = " 0.2 " , features = [" serde" ] }
25
+ toml = { version = " 0.3 " , features = [" serde" ] }
26
26
open = " 1.1"
27
27
regex = " 0.2.1"
28
28
29
29
# Watch feature
30
- notify = { version = " 3 .0" , optional = true }
30
+ notify = { version = " 4 .0" , optional = true }
31
31
time = { version = " 0.1.34" , optional = true }
32
32
crossbeam = { version = " 0.2.8" , optional = true }
33
33
34
34
# 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 }
38
38
39
39
# Tests
40
40
[dev-dependencies ]
Original file line number Diff line number Diff line change @@ -82,13 +82,10 @@ impl BookConfig {
82
82
}
83
83
84
84
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) ;
92
89
exit ( 2 ) ;
93
90
}
94
91
} ;
You can’t perform that action at this time.
0 commit comments