Skip to content

Commit e92c3b6

Browse files
authored
Merge pull request #825 from slivingston/update-docs
docs(readme): Update example to prefer DocumentMut
2 parents a07313e + 017a74d commit e92c3b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/toml_edit/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ relative order* of items.
1616
## Example
1717

1818
```rust
19-
use toml_edit::{Document, value};
19+
use toml_edit::{DocumentMut, value};
2020

2121
fn main() {
2222
let toml = r#"
2323
"hello" = 'toml!' # comment
2424
['a'.b]
2525
"#;
26-
let mut doc = toml.parse::<Document>().expect("invalid doc");
26+
let mut doc = toml.parse::<DocumentMut>().expect("invalid doc");
2727
assert_eq!(doc.to_string(), toml);
2828
// let's add a new key/value pair inside a.b: c = {d = "hello"}
2929
doc["a"]["b"]["c"]["d"] = value("hello");

0 commit comments

Comments
 (0)