toml: simplify Doc.to_any() method (#12495)

pull/12496/head^2
Larpon 2021-11-17 19:58:06 +01:00 committed by GitHub
parent 2f5fae06ee
commit 81455acd29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -92,8 +92,7 @@ pub fn (d Doc) to_json() string {
// to_any converts the `Doc` to toml.Any type.
pub fn (d Doc) to_any() Any {
values := d.ast.table as map[string]ast.Value
return d.ast_to_any(values)
return d.ast_to_any(d.ast.table)
}
// value queries a value from the TOML document.