Skip to content

Commit 95d7267

Browse files
authored
Update alloc.rs
fix typo
1 parent c3cc972 commit 95d7267

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/stable_mir/src/mir/alloc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl IndexedVal for AllocId {
5555
/// Utility function used to read an allocation data into a unassigned integer.
5656
pub(crate) fn read_target_uint(mut bytes: &[u8]) -> Result<u128, Error> {
5757
let mut buf = [0u8; std::mem::size_of::<u128>()];
58-
match MachineInfo::target_endianess() {
58+
match MachineInfo::target_endianness() {
5959
Endian::Little => {
6060
bytes.read(&mut buf)?;
6161
Ok(u128::from_le_bytes(buf))
@@ -70,7 +70,7 @@ pub(crate) fn read_target_uint(mut bytes: &[u8]) -> Result<u128, Error> {
7070
/// Utility function used to read an allocation data into an assigned integer.
7171
pub(crate) fn read_target_int(mut bytes: &[u8]) -> Result<i128, Error> {
7272
let mut buf = [0u8; std::mem::size_of::<i128>()];
73-
match MachineInfo::target_endianess() {
73+
match MachineInfo::target_endianness() {
7474
Endian::Little => {
7575
bytes.read(&mut buf)?;
7676
Ok(i128::from_le_bytes(buf))

0 commit comments

Comments
 (0)