all: fix minor issues found by staticcheck

Signed-off-by: Moritz Poldrack <git@moritz.sh>
This commit is contained in:
Moritz Poldrack 2022-03-09 22:48:00 +01:00 committed by Robin Jarry
commit 4bc43d2741
11 changed files with 17 additions and 27 deletions
commands/msg

View file

@ -88,15 +88,14 @@ func findNextNonDeleted(deleted []uint32, store *lib.MessageStore) *models.Messa
if !contains(deleted, selected.Uid) {
return selected
}
for {
store.Next()
next := store.Selected()
if next == selected || next == nil {
// the last message is in the deleted state or doesn't exist
return nil
}
return next
store.Next()
next := store.Selected()
if next == selected || next == nil {
// the last message is in the deleted state or doesn't exist
return nil
}
return next
}
func contains(uids []uint32, uid uint32) bool {

View file

@ -122,7 +122,7 @@ func (reply) Execute(aerc *widgets.Aerc, args []string) error {
}
}
if len(to) == 0 {
to = append(msg.Envelope.To)
to = msg.Envelope.To
}
}