Skip to content

Commit 5413fdd

Browse files
committed
chore: address deprecated import in toml crate
1 parent 33e3cae commit 5413fdd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/toml.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use toml_edit::{visit::*, Document, Item, Value};
1+
use toml_edit::{visit::*, DocumentMut, Item, Value};
22

33
#[derive(Default)]
44
pub(crate) struct DeepKeysCollector<'doc> {
@@ -8,7 +8,7 @@ pub(crate) struct DeepKeysCollector<'doc> {
88

99
impl DeepKeysCollector<'_> {
1010
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();
1212
let mut visitor = DeepKeysCollector::default();
1313
visitor.visit_document(&document);
1414

@@ -47,7 +47,7 @@ impl<'doc> Visit<'doc> for DeepKeysCollector<'doc> {
4747

4848
#[cfg(test)]
4949
mod tests {
50-
use toml_edit::Document;
50+
use toml_edit::DocumentMut;
5151

5252
use crate::settings::Settings;
5353

@@ -60,7 +60,7 @@ laputa = "sky-castle"
6060
the-force = { value = "surrounds-you" }
6161
"#;
6262

63-
let document: Document = input.parse().unwrap();
63+
let document: DocumentMut = input.parse().unwrap();
6464
let mut visitor = DeepKeysCollector::default();
6565
visitor.visit_document(&document);
6666

@@ -93,7 +93,7 @@ the-force = { value = "surrounds-you" }
9393
fn test_default_config() {
9494
let input = toml::to_string_pretty(&Settings::new().unwrap()).unwrap();
9595

96-
let document: Document = input.parse().unwrap();
96+
let document: DocumentMut = input.parse().unwrap();
9797
let mut visitor = DeepKeysCollector::default();
9898
visitor.visit_document(&document);
9999

0 commit comments

Comments
 (0)