From cb8ca2dafdbcdedcaeb2573dccd3b3e4a26cae44 Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Tue, 17 Jun 2014 15:47:31 -0700 Subject: Shorten endian conversion method names The consensus on #14917 was that the proposed names were too long. --- src/libcore/mem.rs | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src/libcore/mem.rs') diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 1032b820b27..5280ac0d64f 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -173,85 +173,85 @@ pub unsafe fn move_val_init(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. -- cgit 1.4.1-3-g733a5