1
Fork 0

Shorten endian conversion method names

The consensus on #14917 was that the proposed names were too long.
This commit is contained in:
Brendan Zabarauskas 2014-06-17 15:47:31 -07:00 committed by Alex Crichton
parent 779ca97525
commit cb8ca2dafd
9 changed files with 84 additions and 84 deletions

View file

@ -173,85 +173,85 @@ pub unsafe fn move_val_init<T>(dst: &mut T, src: T) {
///
/// On little endian, this is a no-op. On big endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::to_little_endian` instead"]
pub fn to_le16(x: u16) -> u16 { x.to_little_endian() }
#[deprecated = "use `Int::to_le` instead"]
pub fn to_le16(x: u16) -> u16 { x.to_le() }
/// Convert an u32 to little endian from the target's endianness.
///
/// On little endian, this is a no-op. On big endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::to_little_endian` instead"]
pub fn to_le32(x: u32) -> u32 { x.to_little_endian() }
#[deprecated = "use `Int::to_le` instead"]
pub fn to_le32(x: u32) -> u32 { x.to_le() }
/// Convert an u64 to little endian from the target's endianness.
///
/// On little endian, this is a no-op. On big endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::to_little_endian` instead"]
pub fn to_le64(x: u64) -> u64 { x.to_little_endian() }
#[deprecated = "use `Int::to_le` instead"]
pub fn to_le64(x: u64) -> u64 { x.to_le() }
/// Convert an u16 to big endian from the target's endianness.
///
/// On big endian, this is a no-op. On little endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::to_big_endian` instead"]
pub fn to_be16(x: u16) -> u16 { x.to_big_endian() }
#[deprecated = "use `Int::to_be` instead"]
pub fn to_be16(x: u16) -> u16 { x.to_be() }
/// Convert an u32 to big endian from the target's endianness.
///
/// On big endian, this is a no-op. On little endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::to_big_endian` instead"]
pub fn to_be32(x: u32) -> u32 { x.to_big_endian() }
#[deprecated = "use `Int::to_be` instead"]
pub fn to_be32(x: u32) -> u32 { x.to_be() }
/// Convert an u64 to big endian from the target's endianness.
///
/// On big endian, this is a no-op. On little endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::to_big_endian` instead"]
pub fn to_be64(x: u64) -> u64 { x.to_big_endian() }
#[deprecated = "use `Int::to_be` instead"]
pub fn to_be64(x: u64) -> u64 { x.to_be() }
/// Convert an u16 from little endian to the target's endianness.
///
/// On little endian, this is a no-op. On big endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::from_little_endian` instead"]
pub fn from_le16(x: u16) -> u16 { Int::from_little_endian(x) }
#[deprecated = "use `Int::from_le` instead"]
pub fn from_le16(x: u16) -> u16 { Int::from_le(x) }
/// Convert an u32 from little endian to the target's endianness.
///
/// On little endian, this is a no-op. On big endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::from_little_endian` instead"]
pub fn from_le32(x: u32) -> u32 { Int::from_little_endian(x) }
#[deprecated = "use `Int::from_le` instead"]
pub fn from_le32(x: u32) -> u32 { Int::from_le(x) }
/// Convert an u64 from little endian to the target's endianness.
///
/// On little endian, this is a no-op. On big endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::from_little_endian` instead"]
pub fn from_le64(x: u64) -> u64 { Int::from_little_endian(x) }
#[deprecated = "use `Int::from_le` instead"]
pub fn from_le64(x: u64) -> u64 { Int::from_le(x) }
/// Convert an u16 from big endian to the target's endianness.
///
/// On big endian, this is a no-op. On little endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::from_big_endian` instead"]
pub fn from_be16(x: u16) -> u16 { Int::from_big_endian(x) }
#[deprecated = "use `Int::from_be` instead"]
pub fn from_be16(x: u16) -> u16 { Int::from_be(x) }
/// Convert an u32 from big endian to the target's endianness.
///
/// On big endian, this is a no-op. On little endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::from_big_endian` instead"]
pub fn from_be32(x: u32) -> u32 { Int::from_big_endian(x) }
#[deprecated = "use `Int::from_be` instead"]
pub fn from_be32(x: u32) -> u32 { Int::from_be(x) }
/// Convert an u64 from big endian to the target's endianness.
///
/// On big endian, this is a no-op. On little endian, the bytes are swapped.
#[inline]
#[deprecated = "use `Int::from_big_endian` instead"]
pub fn from_be64(x: u64) -> u64 { Int::from_big_endian(x) }
#[deprecated = "use `Int::from_be` instead"]
pub fn from_be64(x: u64) -> u64 { Int::from_be(x) }
/// Swap the values at two mutable locations of the same type, without
/// deinitialising or copying either one.