fix: sending does not work

We were inserting one too many 0xff bytes
This commit is contained in:
Timo Kösters 2022-10-09 21:56:56 +02:00 committed by Nyaaori
parent 229444c932
commit ca82b2940d
No known key found for this signature in database
GPG key ID: E7819C3ED4D1F82E
6 changed files with 18 additions and 47 deletions

View file

@ -161,6 +161,7 @@ impl KvTree for RocksDbEngineTree<'_> {
self.db
.rocks
.iterator_cf(&self.cf(), rocksdb::IteratorMode::Start)
//.map(|r| r.unwrap())
.map(|(k, v)| (Vec::from(k), Vec::from(v))),
)
}
@ -184,6 +185,7 @@ impl KvTree for RocksDbEngineTree<'_> {
},
),
)
//.map(|r| r.unwrap())
.map(|(k, v)| (Vec::from(k), Vec::from(v))),
)
}
@ -224,6 +226,7 @@ impl KvTree for RocksDbEngineTree<'_> {
&self.cf(),
rocksdb::IteratorMode::From(&prefix, rocksdb::Direction::Forward),
)
//.map(|r| r.unwrap())
.map(|(k, v)| (Vec::from(k), Vec::from(v)))
.take_while(move |(k, _)| k.starts_with(&prefix)),
)