From 8ea86cea41aa038a25a8fee9cd540a7336869dae Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Sat, 30 Jan 2021 13:51:32 +0100 Subject: Get rid of the aerc.PushError(" " + $string) idiom The individual callers should not be responsible for padding --- widgets/account-wizard.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'widgets/account-wizard.go') diff --git a/widgets/account-wizard.go b/widgets/account-wizard.go index 71ba6e1..d8e2eb0 100644 --- a/widgets/account-wizard.go +++ b/widgets/account-wizard.go @@ -428,7 +428,7 @@ func (wizard *AccountWizard) ConfigureTemporaryAccount(temporary bool) { func (wizard *AccountWizard) errorFor(d ui.Interactive, err error) { if d == nil { - wizard.aerc.PushError(" " + err.Error()) + wizard.aerc.PushError(err.Error()) wizard.Invalidate() return } @@ -443,7 +443,7 @@ func (wizard *AccountWizard) errorFor(d ui.Interactive, err error) { wizard.step = step wizard.focus = focus wizard.Focus(true) - wizard.aerc.PushError(" " + err.Error()) + wizard.aerc.PushError(err.Error()) wizard.Invalidate() return } @@ -559,7 +559,7 @@ func (wizard *AccountWizard) finish(tutorial bool) { term.OnClose = func(err error) { wizard.aerc.RemoveTab(term) if err != nil { - wizard.aerc.PushError(" " + err.Error()) + wizard.aerc.PushError(err.Error()) } } } -- cgit v1.2.3