add impl Update for std::convert::Infallible

This commit is contained in:
gvozdvmozgu 2024-10-27 00:31:43 -07:00
parent 5eed7e9078
commit 8662fc6694

View file

@ -157,6 +157,12 @@ pub unsafe trait Update {
unsafe fn maybe_update(old_pointer: *mut Self, new_value: Self) -> bool; unsafe fn maybe_update(old_pointer: *mut Self, new_value: Self) -> bool;
} }
unsafe impl Update for std::convert::Infallible {
unsafe fn maybe_update(_old_pointer: *mut Self, new_value: Self) -> bool {
match new_value {}
}
}
unsafe impl<T> Update for Vec<T> unsafe impl<T> Update for Vec<T>
where where
T: Update, T: Update,