aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/syndtr/goleveldb/leveldb/comparer
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2018-11-29 03:53:02 +0800
committerMartin Holst Swende <martin@swende.se>2018-11-29 16:58:09 +0800
commit8380a1303ce6a2fa4760a8641e47e7196a941b4c (patch)
treeaf7ed6cf97ccb0e93a446c1ebcf1d44c52bcc491 /vendor/github.com/syndtr/goleveldb/leveldb/comparer
parent695a5cce1e4c0db173dd2a798ed0dc14ee9ca2a1 (diff)
downloadgo-tangerine-8380a1303ce6a2fa4760a8641e47e7196a941b4c.tar.gz
go-tangerine-8380a1303ce6a2fa4760a8641e47e7196a941b4c.tar.zst
go-tangerine-8380a1303ce6a2fa4760a8641e47e7196a941b4c.zip
vendor: update leveldb
Diffstat (limited to 'vendor/github.com/syndtr/goleveldb/leveldb/comparer')
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go4
-rw-r--r--vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go
index 14dddf88d..abf9fb65c 100644
--- a/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go
@@ -29,7 +29,7 @@ func (bytesComparer) Separator(dst, a, b []byte) []byte {
// Do not shorten if one string is a prefix of the other
} else if c := a[i]; c < 0xff && c+1 < b[i] {
dst = append(dst, a[:i+1]...)
- dst[i]++
+ dst[len(dst)-1]++
return dst
}
return nil
@@ -39,7 +39,7 @@ func (bytesComparer) Successor(dst, b []byte) []byte {
for i, c := range b {
if c != 0xff {
dst = append(dst, b[:i+1]...)
- dst[i]++
+ dst[len(dst)-1]++
return dst
}
}
diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go
index 14a28f16f..2c522db23 100644
--- a/vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go
+++ b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go
@@ -36,7 +36,7 @@ type Comparer interface {
// by any users of this package.
Name() string
- // Bellow are advanced functions used used to reduce the space requirements
+ // Bellow are advanced functions used to reduce the space requirements
// for internal data structures such as index blocks.
// Separator appends a sequence of bytes x to dst such that a <= x && x < b,