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:
parent
dc271b4da2
commit
c6dae02925
1 changed files with 2 additions and 2 deletions
4
aerc.go
4
aerc.go
|
@ -58,7 +58,7 @@ func getCommands(selected libui.Drawable) []*commands.Commands {
|
||||||
}
|
}
|
||||||
|
|
||||||
func execCommand(aerc *widgets.Aerc, ui *libui.UI, cmd []string) error {
|
func execCommand(aerc *widgets.Aerc, ui *libui.UI, cmd []string) error {
|
||||||
cmds := getCommands((*aerc).SelectedTab())
|
cmds := getCommands(aerc.SelectedTab())
|
||||||
for i, set := range cmds {
|
for i, set := range cmds {
|
||||||
err := set.ExecuteCommand(aerc, cmd)
|
err := set.ExecuteCommand(aerc, cmd)
|
||||||
if _, ok := err.(commands.NoSuchCommand); ok {
|
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 {
|
func getCompletions(aerc *widgets.Aerc, cmd string) []string {
|
||||||
var completions []string
|
var completions []string
|
||||||
for _, set := range getCommands((*aerc).SelectedTab()) {
|
for _, set := range getCommands(aerc.SelectedTab()) {
|
||||||
completions = append(completions, set.GetCompletions(aerc, cmd)...)
|
completions = append(completions, set.GetCompletions(aerc, cmd)...)
|
||||||
}
|
}
|
||||||
sort.Strings(completions)
|
sort.Strings(completions)
|
||||||
|
|
Loading…
Reference in a new issue