Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a new type MinutesSinceEpoch to replace i32 in MetaZonePeriodV1 #2355

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samchen61661
Copy link
Member

Create a new type like MinutesSinceEpoch to replace i32 in MetaZonePeriodV1 (#2155)

@samchen61661 samchen61661 requested a review from a team as a code owner August 8, 2022 22:41
@samchen61661 samchen61661 requested review from sffc and nordzilla and removed request for a team August 8, 2022 22:41

pub(crate) struct DeserializeMinutesSinceEpochString;

impl<'de> serde::de::Visitor<'de> for DeserializeMinutesSinceEpochString {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are some errors complaining like failed to resolve: use of undeclared crate or module de`` or cannot find Deserialize.

I tried to use sth like use ::serde::{de, Deserialize, Deserializer}; from other examples, but had no luck.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the annotation #[cfg(feature = "serde")]

where
S: serde::Serializer,
{
let string = DateTime::from_minutes_since_local_unix_epoch(26382240)?.to_string();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like there is no to_string for DateTime. Should I construct the string by myself here?

@sffc sffc marked this pull request as draft August 9, 2022 22:01
@sffc
Copy link
Member

sffc commented Aug 9, 2022

We are now considering this blocked on #2127

Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocked on #2127

@robertbastian robertbastian added the blocked A dependency must be resolved before this is actionable label Oct 25, 2023
@nordzilla nordzilla removed their request for review December 8, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked A dependency must be resolved before this is actionable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants