Skip to content

Commit

Permalink
Fix compilation from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed Jan 16, 2024
1 parent 58686a2 commit 810f38a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/model/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::collections::HashMap;
use std::fmt;
use std::hash::Hash;
use std::marker::PhantomData;
use std::num::NonZeroU64;

use arrayvec::ArrayVec;
use serde::ser::{Serialize, SerializeSeq, Serializer};
Expand Down Expand Up @@ -75,7 +74,7 @@ where
pub fn deserialize_buggy_id<'de, D, Id>(deserializer: D) -> StdResult<Option<Id>, D::Error>
where
D: Deserializer<'de>,
Id: From<NonZeroU64>,
Id: From<u64>,
{
#[derive(serde::Deserialize)]
#[serde(untagged)]
Expand All @@ -91,7 +90,7 @@ where
None => return Ok(None),
};

Ok(NonZeroU64::new(raw_int).map(Id::from))
Ok(Some(Id::from(raw_int)))
}

/// Used with `#[serde(with = "emojis")]`
Expand Down

0 comments on commit 810f38a

Please sign in to comment.