@@ -41,11 +41,7 @@ generally requires serializing both its big-endian and little-endian variants,
4141and then loading the correct one based on the target's endianness.
4242*/
4343
44- use core:: {
45- cmp,
46- convert:: { TryFrom , TryInto } ,
47- mem:: size_of,
48- } ;
44+ use core:: { cmp, mem:: size_of} ;
4945
5046#[ cfg( feature = "alloc" ) ]
5147use alloc:: { vec, vec:: Vec } ;
@@ -867,11 +863,6 @@ pub(crate) trait Endian {
867863 /// this panics.
868864 fn write_u32 ( n : u32 , dst : & mut [ u8 ] ) ;
869865
870- /// Writes a u64 to the given destination buffer in a particular
871- /// endianness. If the destination buffer has a length smaller than 8, then
872- /// this panics.
873- fn write_u64 ( n : u64 , dst : & mut [ u8 ] ) ;
874-
875866 /// Writes a u128 to the given destination buffer in a particular
876867 /// endianness. If the destination buffer has a length smaller than 16,
877868 /// then this panics.
@@ -897,10 +888,6 @@ impl Endian for LE {
897888 dst[ ..4 ] . copy_from_slice ( & n. to_le_bytes ( ) ) ;
898889 }
899890
900- fn write_u64 ( n : u64 , dst : & mut [ u8 ] ) {
901- dst[ ..8 ] . copy_from_slice ( & n. to_le_bytes ( ) ) ;
902- }
903-
904891 fn write_u128 ( n : u128 , dst : & mut [ u8 ] ) {
905892 dst[ ..16 ] . copy_from_slice ( & n. to_le_bytes ( ) ) ;
906893 }
@@ -915,10 +902,6 @@ impl Endian for BE {
915902 dst[ ..4 ] . copy_from_slice ( & n. to_be_bytes ( ) ) ;
916903 }
917904
918- fn write_u64 ( n : u64 , dst : & mut [ u8 ] ) {
919- dst[ ..8 ] . copy_from_slice ( & n. to_be_bytes ( ) ) ;
920- }
921-
922905 fn write_u128 ( n : u128 , dst : & mut [ u8 ] ) {
923906 dst[ ..16 ] . copy_from_slice ( & n. to_be_bytes ( ) ) ;
924907 }
0 commit comments