is_null is a tricky one isn't it? If you just compare one field (the pointer) to null, then for a fat pointer there are many null values. Might surprise someone down the line, don't know if there is any worse impact than that.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Is there a reason that std::ptr requires T: Sized? | 4 | 887 | January 12, 2023 | |
Making custom fat pointer types to behave as &mut | 6 | 946 | November 13, 2021 | |
Zero initialize `AtomicPtr` and `AtomicUsize` | 8 | 1457 | January 12, 2023 | |
Pointer metadata on stable
|
4 | 432 | February 27, 2024 | |
Best way to cast Option<&T> to *const T | 29 | 1553 | May 4, 2023 |