Skip to content

Commit 1b83601

Browse files
refactor(gmail): remove dead code in primarySendAsDisplayNameFromList
The condition `primary == nil && sa.IsPrimary` inside the email-matching block can never be true because `primary` is already unconditionally set to `sa` when `sa.IsPrimary` is true earlier in the same loop iteration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9845cba commit 1b83601

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

internal/cmd/gmail_send.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,6 @@ func primarySendAsDisplayNameFromList(ctx context.Context, svc *gmail.Service, a
285285
if displayName := strings.TrimSpace(sa.DisplayName); displayName != "" {
286286
return displayName, nil
287287
}
288-
if primary == nil && sa.IsPrimary {
289-
primary = sa
290-
}
291288
}
292289
}
293290

0 commit comments

Comments
 (0)