Fix missing desrialize for FileOpenMode
Some checks failed
CI / Test suite (push) Has been cancelled
CI / Test suite (windows) (push) Has been cancelled
CI / Rust ${{matrix.rust}} (beta) (push) Has been cancelled
CI / Rust ${{matrix.rust}} (stable) (push) Has been cancelled
CI / Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}} (ubuntu) (push) Has been cancelled
CI / Rust nightly ${{matrix.os == 'windows' && '(windows)' || ''}} (windows) (push) Has been cancelled
CI / Rust ${{matrix.rust}} (1.31.0) (push) Has been cancelled
CI / Rust ${{matrix.rust}} (1.34.0) (push) Has been cancelled
CI / Rust 1.56.0 (push) Has been cancelled
CI / Rust 1.36.0 (push) Has been cancelled
CI / Minimal versions (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Miri (push) Has been cancelled
CI / Outdated (push) Has been cancelled

This commit is contained in:
pjht 2024-11-16 11:50:22 -06:00
parent 678d2be06c
commit f5700b61ad
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -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<D>(deserializer: D) -> Result<Self, D::Error>
where
D: Deserializer<'de>,
{
deserializer.deserialize_enum("FileOpenMode", &["Read", "Write", "ReadWrite"], FileOpenModeVisitor)
}
}