fix 3 cases of shadowed variables (other than "err")

2 of these were actual bugs.
This commit is contained in:
Mechiel Lukkien 2023-02-16 13:24:51 +01:00
parent 5c33640aea
commit c65731ac56
No known key found for this signature in database
3 changed files with 5 additions and 4 deletions

View file

@ -149,7 +149,7 @@ func accountHandle(w http.ResponseWriter, r *http.Request) {
}
flusher.Flush()
ctx := r.Context()
cctx := r.Context()
for {
select {
case e := <-l.Events:
@ -159,7 +159,7 @@ func accountHandle(w http.ResponseWriter, r *http.Request) {
return
}
case <-ctx.Done():
case <-cctx.Done():
return
}
}

View file

@ -126,7 +126,7 @@ func importManage() {
case e := <-importers.Events:
s, ok := imports[e.Token]
if !ok {
s := state{
s = state{
MailboxCounts: map[string]int{},
Listeners: map[*importListener]struct{}{},
Cancel: e.Cancel,

View file

@ -1165,7 +1165,8 @@ func (a *Account) RejectsRemove(log *mlog.Log, rejectsMailbox, messageID string)
q := bstore.QueryTx[Message](tx)
q.FilterNonzero(Message{MailboxID: mb.ID, MessageID: messageID})
remove, err := q.List()
var err error
remove, err = q.List()
xcheckf(err, "listing messages to remove")
changes = a.xremoveMessages(log, tx, mb, remove)