Skip to content

Commit

Permalink
Use #[serde_as] from import without crate name
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbb committed Jan 23, 2024
1 parent b2afd76 commit 215d77a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions serde_with/tests/schemars_0_8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ macro_rules! declare_snapshot_test {
#[test]
$(#[$tattr])*
fn $test() {
#[serde_with::serde_as]
#[serde_as]
#[derive(JsonSchema, Serialize)]
$( #[$stattr] )*
struct $name {
Expand Down Expand Up @@ -62,7 +62,7 @@ fn schemars_basic() {
use ::schemars_0_8::JsonSchema;
use serde::Serialize;

#[serde_with::serde_as]
#[serde_as]
#[derive(JsonSchema, Serialize)]
#[schemars(crate = "::schemars_0_8")]
struct Basic {
Expand Down Expand Up @@ -245,15 +245,15 @@ mod snapshots {
mod derive {
use super::*;

#[serde_with::serde_as]
#[serde_as]
#[derive(Serialize)]
#[cfg_attr(all(), derive(JsonSchema))]
struct Enabled {
#[serde_as(as = "DisplayFromStr")]
field: u32,
}

#[serde_with::serde_as]
#[serde_as]
#[derive(Serialize)]
#[cfg_attr(any(), derive(JsonSchema))]
struct Disabled {
Expand All @@ -272,7 +272,7 @@ mod derive {
mod array {
use super::*;

#[serde_with::serde_as]
#[serde_as]
#[derive(JsonSchema, Serialize)]
struct FixedArray {
#[serde_as(as = "[_; 3]")]
Expand Down

0 comments on commit 215d77a

Please sign in to comment.