diff --git a/src/endian.rs b/src/endian.rs index 5f6e9bf..18e4da3 100644 --- a/src/endian.rs +++ b/src/endian.rs @@ -2,6 +2,11 @@ pub trait ToNativeEndian { fn to_ne(self) -> Self; } +/** + * A simple trait that adds a function to u32/u64 types + * to convert a number's endianness to native-endian + * based on the platform the code was built for + */ impl ToNativeEndian for u32 { #[cfg(target_endian = "big")] fn to_ne(self) -> Self {