Skip to content

Commit

Permalink
types: make vint_[en/de]code functions pub
Browse files Browse the repository at this point in the history
This is just for the sake of cpp-rust-driver
which implements custom serialization.
  • Loading branch information
muzarski committed Jul 31, 2024
1 parent 34352da commit b67eff1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scylla-cql/src/frame/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,11 +678,11 @@ fn unsigned_vint_decode(buf: &mut &[u8]) -> Result<u64, std::io::Error> {
Ok(v)
}

pub(crate) fn vint_encode(v: i64, buf: &mut Vec<u8>) {
pub fn vint_encode(v: i64, buf: &mut Vec<u8>) {
unsigned_vint_encode(zig_zag_encode(v), buf)
}

pub(crate) fn vint_decode(buf: &mut &[u8]) -> Result<i64, std::io::Error> {
pub fn vint_decode(buf: &mut &[u8]) -> Result<i64, std::io::Error> {
unsigned_vint_decode(buf).map(zig_zag_decode)
}

Expand Down

0 comments on commit b67eff1

Please sign in to comment.