From 424c453610f2e730c97fee1abcd0120683390ae3 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 5 Feb 2025 15:59:55 +0200 Subject: [PATCH] fix warning when compiling cmd/tools/vast/vast.v, add description of -s to ast.txt too --- cmd/tools/vast/vast.v | 2 +- vlib/v/help/other/ast.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/tools/vast/vast.v b/cmd/tools/vast/vast.v index 329bb0782..31cf5d099 100644 --- a/cmd/tools/vast/vast.v +++ b/cmd/tools/vast/vast.v @@ -79,7 +79,7 @@ fn (ctx Context) skip_empty(child &Node) bool { return true } if slen > 7 { - s := child.valuestring.vstring_with_len(slen) + s := unsafe { child.valuestring.vstring_with_len(slen) } if s.starts_with('enum:0(') { return true } diff --git a/vlib/v/help/other/ast.txt b/vlib/v/help/other/ast.txt index de2c1abb7..5c78f83f0 100644 --- a/vlib/v/help/other/ast.txt +++ b/vlib/v/help/other/ast.txt @@ -21,6 +21,7 @@ Options: File, *AND* generate a .c file too on any change -t, --terse terse output, only with tree node names (AST structure), no details + -s, --skip-defaults skip properties that have default values like [], {}, false, 0, "" --hide Hide the specified fields. You can give several, by separating them with `,` -h, --help Display this help and exit -- 2.39.5