add some consts

This commit is contained in:
Jean-Marie Mineau 2023-08-23 12:59:29 +02:00
parent 5dd96fb173
commit d44e2b624b
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
5 changed files with 280 additions and 10 deletions

View file

@ -6,15 +6,15 @@ use crate::{Error, ReadSeek, Result, Serializable};
/// Signed LEB128, variable-length
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Sleb128(i32);
pub struct Sleb128(pub i32);
/// Unsigned LEB128, variable-length
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Uleb128(u32);
pub struct Uleb128(pub u32);
/// Unsigned LEB128 plus 1, variable-length
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Uleb128p1(u32);
pub struct Uleb128p1(pub u32);
impl Sleb128 {
fn get_serialized_bytes(&self) -> Vec<u8> {