From f5700b61adc3665d589761358a689ce5d57ce897 Mon Sep 17 00:00:00 2001 From: pjht Date: Sat, 16 Nov 2024 11:50:22 -0600 Subject: [PATCH] Fix missing desrialize for FileOpenMode --- serde/src/de/impls.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/serde/src/de/impls.rs b/serde/src/de/impls.rs index 915b53a7..1fc88773 100644 --- a/serde/src/de/impls.rs +++ b/serde/src/de/impls.rs @@ -3361,3 +3361,13 @@ impl<'de> Visitor<'de> for FileOpenModeVisitor { } } } + +#[cfg(target_os = "mikros")] +impl<'de> Deserialize<'de> for std::os::mikros::FileOpenMode { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + deserializer.deserialize_enum("FileOpenMode", &["Read", "Write", "ReadWrite"], FileOpenModeVisitor) + } +}