Fix typos in comments

This commit is contained in:
LeslieKid
2024-04-12 06:27:38 +08:00
committed by Tate, Hongliang Tian
parent 726632ad70
commit e8a991048f

View File

@ -17,8 +17,8 @@ macro_rules! offset_of {
($container:ty, $($field:tt)+) => ({ ($container:ty, $($field:tt)+) => ({
// SAFETY. It is ok to have this uninitialized value because // SAFETY. It is ok to have this uninitialized value because
// 1) Its memory won't be acccessed; // 1) Its memory won't be acccessed;
// 2) It will be forgoten rather than being dropped; // 2) It will be forgotten rather than being dropped;
// 3) Before it gets forgten, the code won't return prematurely or panic. // 3) Before it gets forgotten, the code won't return prematurely or panic.
let tmp: $container = unsafe { core::mem::MaybeUninit::uninit().assume_init() }; let tmp: $container = unsafe { core::mem::MaybeUninit::uninit().assume_init() };
let container_addr = &tmp as *const _; let container_addr = &tmp as *const _;