Skip to content

Commit

Permalink
Import ToString from alloc when no_std
Browse files Browse the repository at this point in the history
  • Loading branch information
sinking-point committed May 17, 2023
1 parent 81883f0 commit 172ea3d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/datetime/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,9 @@ pub mod ts_nanoseconds_option {
/// ```
#[cfg(any(feature = "alloc", feature = "std", test))]
pub mod ts_nanoseconds_string {
#[cfg(all(not(feature = "std"), feature = "alloc"))]
use crate::datetime::alloc::string::ToString;

use core::fmt;
use serde::de::Unexpected;
use serde::{de, ser};
Expand Down Expand Up @@ -817,6 +820,9 @@ pub mod ts_microseconds_option {
/// ```
#[cfg(any(feature = "alloc", feature = "std", test))]
pub mod ts_microseconds_string {
#[cfg(all(not(feature = "std"), feature = "alloc"))]
use crate::datetime::alloc::string::ToString;

use core::fmt;
use serde::de::Unexpected;
use serde::{de, ser};
Expand Down Expand Up @@ -1244,6 +1250,9 @@ pub mod ts_milliseconds_option {
/// ```
#[cfg(any(feature = "alloc", feature = "std", test))]
pub mod ts_milliseconds_string {
#[cfg(all(not(feature = "std"), feature = "alloc"))]
use crate::datetime::alloc::string::ToString;

use core::fmt;
use serde::de::Unexpected;
use serde::{de, ser};
Expand Down Expand Up @@ -1655,6 +1664,9 @@ pub mod ts_seconds_option {
/// ```
#[cfg(any(feature = "alloc", feature = "std", test))]
pub mod ts_seconds_string {
#[cfg(all(not(feature = "std"), feature = "alloc"))]
use crate::datetime::alloc::string::ToString;

use core::fmt;
use serde::de::Unexpected;
use serde::{de, ser};
Expand Down

0 comments on commit 172ea3d

Please sign in to comment.