1
- use toml_edit:: { visit:: * , Document , Item , Value } ;
1
+ use toml_edit:: { visit:: * , DocumentMut , Item , Value } ;
2
2
3
3
#[ derive( Default ) ]
4
4
pub ( crate ) struct DeepKeysCollector < ' doc > {
@@ -8,7 +8,7 @@ pub(crate) struct DeepKeysCollector<'doc> {
8
8
9
9
impl DeepKeysCollector < ' _ > {
10
10
pub fn get_keys ( toml_string : String ) -> Vec < String > {
11
- let document: Document = toml_string. parse ( ) . unwrap ( ) ;
11
+ let document: DocumentMut = toml_string. parse ( ) . unwrap ( ) ;
12
12
let mut visitor = DeepKeysCollector :: default ( ) ;
13
13
visitor. visit_document ( & document) ;
14
14
@@ -47,7 +47,7 @@ impl<'doc> Visit<'doc> for DeepKeysCollector<'doc> {
47
47
48
48
#[ cfg( test) ]
49
49
mod tests {
50
- use toml_edit:: Document ;
50
+ use toml_edit:: DocumentMut ;
51
51
52
52
use crate :: settings:: Settings ;
53
53
@@ -60,7 +60,7 @@ laputa = "sky-castle"
60
60
the-force = { value = "surrounds-you" }
61
61
"# ;
62
62
63
- let document: Document = input. parse ( ) . unwrap ( ) ;
63
+ let document: DocumentMut = input. parse ( ) . unwrap ( ) ;
64
64
let mut visitor = DeepKeysCollector :: default ( ) ;
65
65
visitor. visit_document ( & document) ;
66
66
@@ -93,7 +93,7 @@ the-force = { value = "surrounds-you" }
93
93
fn test_default_config ( ) {
94
94
let input = toml:: to_string_pretty ( & Settings :: new ( ) . unwrap ( ) ) . unwrap ( ) ;
95
95
96
- let document: Document = input. parse ( ) . unwrap ( ) ;
96
+ let document: DocumentMut = input. parse ( ) . unwrap ( ) ;
97
97
let mut visitor = DeepKeysCollector :: default ( ) ;
98
98
visitor. visit_document ( & document) ;
99
99
0 commit comments