Skip to content

Commit

Permalink
add impl Update for std::convert::Infallible
Browse files Browse the repository at this point in the history
  • Loading branch information
gvozdvmozgu committed Oct 27, 2024
1 parent 5eed7e9 commit 8662fc6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ pub unsafe trait Update {
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>
where
T: Update,
Expand Down

0 comments on commit 8662fc6

Please sign in to comment.