mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 07:18:12 +08:00
Desktop: Ready runtime and render node for desktop (#2952)
* Desktop: Ready runtime and render node for desktop * Address review comments
This commit is contained in:
@@ -78,7 +78,9 @@ impl<'a> serde::Deserialize<'a> for CheckboxId {
|
||||
where
|
||||
D: serde::Deserializer<'a>,
|
||||
{
|
||||
let id = u64::deserialize(deserializer)?;
|
||||
let optional_id: Option<u64> = Option::deserialize(deserializer)?;
|
||||
// TODO: This is potentially weird because after deserialization the two labels will be decoupled if the value not existent
|
||||
let id = optional_id.unwrap_or(0);
|
||||
let checkbox_id = CheckboxId(OnceCell::new().into());
|
||||
checkbox_id.0.set(id).map_err(serde::de::Error::custom)?;
|
||||
Ok(checkbox_id)
|
||||
|
||||
Reference in New Issue
Block a user