feat: impl From<i64> for TrelloCardPosition
Some checks failed
Test / build (map[name:nightly]) (push) Successful in 7m8s
Test / build (map[name:stable]) (push) Successful in 8m28s
Release Please / Release-plz (push) Failing after 46s

This commit is contained in:
Paul Campbell 2024-12-23 09:44:02 +00:00
parent 756abd61c7
commit c2b458323f

View file

@ -1,5 +1,6 @@
//
use derive_more::derive::Display;
use derive_more::From;
use serde::{Deserialize, Deserializer};
use super::attachment::TrelloAttachment;
@ -13,6 +14,11 @@ newtype!(TrelloCardDue, String, Display, "Card Due");
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Display)]
pub(crate) struct TrelloCardPosition(pub i64);
impl From<i64> for TrelloCardPosition {
fn from(value: i64) -> Self {
Self(value)
}
}
impl<'de> Deserialize<'de> for TrelloCardPosition {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>