mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
toml: simplify Doc.to_any() method (#12495)
This commit is contained in:
parent
2f5fae06ee
commit
81455acd29
@ -92,8 +92,7 @@ pub fn (d Doc) to_json() string {
|
|||||||
|
|
||||||
// to_any converts the `Doc` to toml.Any type.
|
// to_any converts the `Doc` to toml.Any type.
|
||||||
pub fn (d Doc) to_any() Any {
|
pub fn (d Doc) to_any() Any {
|
||||||
values := d.ast.table as map[string]ast.Value
|
return d.ast_to_any(d.ast.table)
|
||||||
return d.ast_to_any(values)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// value queries a value from the TOML document.
|
// value queries a value from the TOML document.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user