main: remove unnecessary pointer dereference

Calling a method on a pointer will dereference it automatically.

Signed-off-by: Connor Kuehl <cipkuehl@gmail.com>
Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
Connor Kuehl 2022-04-14 16:30:23 -05:00 committed by Robin Jarry
parent dc271b4da2
commit c6dae02925
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ func getCommands(selected libui.Drawable) []*commands.Commands {
}
func execCommand(aerc *widgets.Aerc, ui *libui.UI, cmd []string) error {
cmds := getCommands((*aerc).SelectedTab())
cmds := getCommands(aerc.SelectedTab())
for i, set := range cmds {
err := set.ExecuteCommand(aerc, cmd)
if _, ok := err.(commands.NoSuchCommand); ok {
@ -80,7 +80,7 @@ func execCommand(aerc *widgets.Aerc, ui *libui.UI, cmd []string) error {
func getCompletions(aerc *widgets.Aerc, cmd string) []string {
var completions []string
for _, set := range getCommands((*aerc).SelectedTab()) {
for _, set := range getCommands(aerc.SelectedTab()) {
completions = append(completions, set.GetCompletions(aerc, cmd)...)
}
sort.Strings(completions)