From 81455acd29102c5463f06c46d2bb8e290fc3d98a Mon Sep 17 00:00:00 2001 From: Larpon Date: Wed, 17 Nov 2021 19:58:06 +0100 Subject: [PATCH] toml: simplify Doc.to_any() method (#12495) --- vlib/toml/toml.v | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlib/toml/toml.v b/vlib/toml/toml.v index 8989116f0a..93f812faff 100644 --- a/vlib/toml/toml.v +++ b/vlib/toml/toml.v @@ -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.