Below, # one and # two are dropped by calling .fmt():
use toml_edit::DocumentMut;
fn main() {
let toml = r#"
[items]
# one
foo = [1, 2, 3]
# two
bar = [4, 5, 6]
"#;
let mut doc = toml.parse::<DocumentMut>().expect("invalid doc");
doc["items"].as_table_mut().map(|t| t.fmt());
let expected = r#"
[items]
foo = [1, 2, 3]
bar = [4, 5, 6]
"#;
assert_eq!(doc.to_string(), expected);
}