1
Fork 0

Rollup merge of #122762 - RoboSchmied:RoboSchmied-typo, r=workingjubilee

fix typo of endianness

fix typo
endianess -> endianness
This commit is contained in:
Jubilee 2024-03-23 22:59:41 -07:00 committed by GitHub
commit 862d870070
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View file

@ -55,7 +55,7 @@ impl IndexedVal for AllocId {
/// Utility function used to read an allocation data into a unassigned integer.
pub(crate) fn read_target_uint(mut bytes: &[u8]) -> Result<u128, Error> {
let mut buf = [0u8; std::mem::size_of::<u128>()];
match MachineInfo::target_endianess() {
match MachineInfo::target_endianness() {
Endian::Little => {
bytes.read_exact(&mut buf[..bytes.len()])?;
Ok(u128::from_le_bytes(buf))
@ -70,7 +70,7 @@ pub(crate) fn read_target_uint(mut bytes: &[u8]) -> Result<u128, Error> {
/// Utility function used to read an allocation data into an assigned integer.
pub(crate) fn read_target_int(mut bytes: &[u8]) -> Result<i128, Error> {
let mut buf = [0u8; std::mem::size_of::<i128>()];
match MachineInfo::target_endianess() {
match MachineInfo::target_endianness() {
Endian::Little => {
bytes.read_exact(&mut buf[..bytes.len()])?;
Ok(i128::from_le_bytes(buf))

View file

@ -14,7 +14,7 @@ impl MachineInfo {
with(|cx| cx.target_info())
}
pub fn target_endianess() -> Endian {
pub fn target_endianness() -> Endian {
with(|cx| cx.target_info().endian)
}