From 8662fc6694eaa25124ebd17a8da7b75ef2967bd1 Mon Sep 17 00:00:00 2001 From: gvozdvmozgu Date: Sun, 27 Oct 2024 00:31:43 -0700 Subject: [PATCH] add impl `Update` for `std::convert::Infallible` --- src/update.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/update.rs b/src/update.rs index 995b72fb..b5676b86 100644 --- a/src/update.rs +++ b/src/update.rs @@ -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 Update for Vec where T: Update,