Improve readability
As suggested by @bboreham Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
This commit is contained in:
parent
9699598952
commit
d12e785075
|
@ -364,8 +364,10 @@ func Compare(a, b Labels) int {
|
||||||
// Now we know that there is some difference before the end of a and b.
|
// Now we know that there is some difference before the end of a and b.
|
||||||
// Go back through the fields and find which field that difference is in.
|
// Go back through the fields and find which field that difference is in.
|
||||||
firstCharDifferent, i := i, 0
|
firstCharDifferent, i := i, 0
|
||||||
for size, nextI := decodeSize(a.data, i); nextI+size <= firstCharDifferent; size, nextI = decodeSize(a.data, i) {
|
size, nextI := decodeSize(a.data, i)
|
||||||
|
for nextI+size <= firstCharDifferent {
|
||||||
i = nextI + size
|
i = nextI + size
|
||||||
|
size, nextI = decodeSize(a.data, i)
|
||||||
}
|
}
|
||||||
// Difference is inside this entry.
|
// Difference is inside this entry.
|
||||||
aStr, _ := decodeString(a.data, i)
|
aStr, _ := decodeString(a.data, i)
|
||||||
|
|
Loading…
Reference in New Issue