[#217] object/policer: Leave readability instead of performance comment

Right now we pass redundant copy to callback outside the for-loop through
the helpful boolean variable instead of calling it deeply nested.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-02-24 18:17:20 +03:00 committed by Alex Vanin
parent f1a4b8d322
commit 5900975d58

View file

@ -70,6 +70,9 @@ func (p *Policer) processNodes(ctx context.Context, addr *object.Address, nodes
if network.IsLocalAddress(p.localAddrSrc, node) {
if shortage == 0 {
// we can call the redundant copy callback
// here to slightly improve the performance
// instead of readability.
redundantLocalCopy = true
break
} else {