diff --git a/lang/rust.go b/lang/rust.go index 7b9899de..ec545924 100644 --- a/lang/rust.go +++ b/lang/rust.go @@ -381,6 +381,9 @@ func addBinSection(result *GenerateResult) error { } exists := false + if cargo["bin"] == nil { + cargo["bin"] = []any{} + } bins := make([]map[string]any, len(cargo["bin"].([]any))) for i, bin := range cargo["bin"].([]any) { bins[i] = bin.(map[string]any)