@@ -1979,10 +1979,10 @@ When starting from a slice rather than an array, fallible conversion APIs can be
1979
1979
```
1980
1980
use std::convert::TryInto;
1981
1981
1982
- fn read_be_ " , stringify!( $SelfT) , "(input: &mut &[u8]) -> " , stringify!( $SelfT) , " {
1982
+ fn read_le_ " , stringify!( $SelfT) , "(input: &mut &[u8]) -> " , stringify!( $SelfT) , " {
1983
1983
let (int_bytes, rest) = input.split_at(std::mem::size_of::<" , stringify!( $SelfT) , ">());
1984
1984
*input = rest;
1985
- " , stringify!( $SelfT) , "::from_be_bytes (int_bytes.try_into().unwrap())
1985
+ " , stringify!( $SelfT) , "::from_le_bytes (int_bytes.try_into().unwrap())
1986
1986
}
1987
1987
```" ) ,
1988
1988
#[ stable( feature = "int_to_from_bytes" , since = "1.32.0" ) ]
@@ -2020,10 +2020,10 @@ When starting from a slice rather than an array, fallible conversion APIs can be
2020
2020
```
2021
2021
use std::convert::TryInto;
2022
2022
2023
- fn read_be_ " , stringify!( $SelfT) , "(input: &mut &[u8]) -> " , stringify!( $SelfT) , " {
2023
+ fn read_ne_ " , stringify!( $SelfT) , "(input: &mut &[u8]) -> " , stringify!( $SelfT) , " {
2024
2024
let (int_bytes, rest) = input.split_at(std::mem::size_of::<" , stringify!( $SelfT) , ">());
2025
2025
*input = rest;
2026
- " , stringify!( $SelfT) , "::from_be_bytes (int_bytes.try_into().unwrap())
2026
+ " , stringify!( $SelfT) , "::from_ne_bytes (int_bytes.try_into().unwrap())
2027
2027
}
2028
2028
```" ) ,
2029
2029
#[ stable( feature = "int_to_from_bytes" , since = "1.32.0" ) ]
@@ -3695,10 +3695,10 @@ When starting from a slice rather than an array, fallible conversion APIs can be
3695
3695
```
3696
3696
use std::convert::TryInto;
3697
3697
3698
- fn read_be_ " , stringify!( $SelfT) , "(input: &mut &[u8]) -> " , stringify!( $SelfT) , " {
3698
+ fn read_le_ " , stringify!( $SelfT) , "(input: &mut &[u8]) -> " , stringify!( $SelfT) , " {
3699
3699
let (int_bytes, rest) = input.split_at(std::mem::size_of::<" , stringify!( $SelfT) , ">());
3700
3700
*input = rest;
3701
- " , stringify!( $SelfT) , "::from_be_bytes (int_bytes.try_into().unwrap())
3701
+ " , stringify!( $SelfT) , "::from_le_bytes (int_bytes.try_into().unwrap())
3702
3702
}
3703
3703
```" ) ,
3704
3704
#[ stable( feature = "int_to_from_bytes" , since = "1.32.0" ) ]
@@ -3736,10 +3736,10 @@ When starting from a slice rather than an array, fallible conversion APIs can be
3736
3736
```
3737
3737
use std::convert::TryInto;
3738
3738
3739
- fn read_be_ " , stringify!( $SelfT) , "(input: &mut &[u8]) -> " , stringify!( $SelfT) , " {
3739
+ fn read_ne_ " , stringify!( $SelfT) , "(input: &mut &[u8]) -> " , stringify!( $SelfT) , " {
3740
3740
let (int_bytes, rest) = input.split_at(std::mem::size_of::<" , stringify!( $SelfT) , ">());
3741
3741
*input = rest;
3742
- " , stringify!( $SelfT) , "::from_be_bytes (int_bytes.try_into().unwrap())
3742
+ " , stringify!( $SelfT) , "::from_ne_bytes (int_bytes.try_into().unwrap())
3743
3743
}
3744
3744
```" ) ,
3745
3745
#[ stable( feature = "int_to_from_bytes" , since = "1.32.0" ) ]
0 commit comments