Skip to content

Commit

Permalink
Rename be_* macros to le_* since they are little endian
Browse files Browse the repository at this point in the history
  • Loading branch information
cberner committed Oct 13, 2023
1 parent 0abfb1e commit d9f2fd5
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ impl RedbKey for &str {
}
}

macro_rules! be_value {
macro_rules! le_value {
($t:ty) => {
impl RedbValue for $t {
type SelfType<'a> = $t;
Expand Down Expand Up @@ -380,9 +380,9 @@ macro_rules! be_value {
};
}

macro_rules! be_impl {
macro_rules! le_impl {
($t:ty) => {
be_value!($t);
le_value!($t);

impl RedbKey for $t {
fn compare(data1: &[u8], data2: &[u8]) -> Ordering {
Expand All @@ -392,15 +392,15 @@ macro_rules! be_impl {
};
}

be_impl!(u8);
be_impl!(u16);
be_impl!(u32);
be_impl!(u64);
be_impl!(u128);
be_impl!(i8);
be_impl!(i16);
be_impl!(i32);
be_impl!(i64);
be_impl!(i128);
be_value!(f32);
be_value!(f64);
le_impl!(u8);
le_impl!(u16);
le_impl!(u32);
le_impl!(u64);
le_impl!(u128);
le_impl!(i8);
le_impl!(i16);
le_impl!(i32);
le_impl!(i64);
le_impl!(i128);
le_value!(f32);
le_value!(f64);

0 comments on commit d9f2fd5

Please sign in to comment.