Skip to content

Commit 6e040d0

Browse files
committed
Fix typos in endian detection.
Sometimes I wonder how I'm even allowed to write code.
1 parent ef3f6f7 commit 6e040d0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/boxed.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ use core::{
1111

1212
use crate::{ops::GenericString, MAX_INLINE};
1313

14-
#[cfg(not(endian = "big"))]
14+
#[cfg(target_endian = "little")]
1515
#[repr(C)]
1616
pub(crate) struct BoxedString {
1717
ptr: NonNull<u8>,
1818
cap: usize,
1919
len: usize,
2020
}
2121

22-
#[cfg(endian = "big")]
22+
#[cfg(target_endian = "big")]
2323
#[repr(C)]
2424
pub(crate) struct BoxedString {
2525
len: usize,
2626
cap: usize,
27-
ptr: NunNull<u8>,
27+
ptr: NonNull<u8>,
2828
}
2929

3030
impl GenericString for BoxedString {

src/inline.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use core::{
88
str::{from_utf8_unchecked, from_utf8_unchecked_mut},
99
};
1010

11-
#[cfg(not(endian = "big"))]
11+
#[cfg(target_endian = "little")]
1212
#[repr(C)]
1313
#[cfg_attr(target_pointer_width = "64", repr(align(8)))]
1414
#[cfg_attr(target_pointer_width = "32", repr(align(4)))]
@@ -17,7 +17,7 @@ pub(crate) struct InlineString {
1717
pub(crate) data: [u8; MAX_INLINE],
1818
}
1919

20-
#[cfg(endian = "big")]
20+
#[cfg(target_endian = "big")]
2121
#[repr(C)]
2222
#[cfg_attr(target_pointer_width = "64", repr(align(8)))]
2323
#[cfg_attr(target_pointer_width = "32", repr(align(4)))]

0 commit comments

Comments
 (0)