From 87c1b41b2533465f230265e663f140b4e0dd93ba Mon Sep 17 00:00:00 2001 From: John Behm Date: Wed, 28 Feb 2024 19:59:51 +0100 Subject: [PATCH] diag: remove incorrect code (#935) --- diag/diagnostics.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/diag/diagnostics.go b/diag/diagnostics.go index 3cd99cbf8..5b842cb2b 100644 --- a/diag/diagnostics.go +++ b/diag/diagnostics.go @@ -43,12 +43,7 @@ func (diags *Diagnostics) Append(in ...Diagnostic) { if diags.Contains(diag) { continue } - - if diags == nil { - *diags = Diagnostics{diag} - } else { - *diags = append(*diags, diag) - } + *diags = append(*diags, diag) } }