mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-02-16 21:16:30 +00:00
rpcsrv: deduplicate RunForErrors code
Signed-off-by: Roman Khimov <roman@nspcc.ru>
This commit is contained in:
parent
d22bdd8369
commit
f15a163cdf
1 changed files with 1 additions and 3 deletions
|
@ -33,9 +33,7 @@ type abstractBatch []abstract
|
|||
// RunForErrors implements abstractResult interface.
|
||||
func (ab abstractBatch) RunForErrors(f func(jsonErr *neorpc.Error)) {
|
||||
for _, a := range ab {
|
||||
if a.Error != nil {
|
||||
f(a.Error)
|
||||
}
|
||||
a.RunForErrors(f)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue