Skip to content

Commit

Permalink
Fix more
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Mar 24, 2023
1 parent e63e6c9 commit c4fbdcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions crates/swc_ecma_ast/src/typescript.rs
Expand Up @@ -711,6 +711,7 @@ pub enum TruePlusMinus {
Minus,
}

#[cfg(feature = "serde-impl")]
impl Serialize for TruePlusMinus {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
Expand All @@ -724,6 +725,7 @@ impl Serialize for TruePlusMinus {
}
}

#[cfg(feature = "serde-impl")]
impl<'de> Deserialize<'de> for TruePlusMinus {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where
Expand Down
5 changes: 3 additions & 2 deletions crates/swc_estree_ast/src/common.rs
Expand Up @@ -36,8 +36,9 @@ impl Loc {
}
}

#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde-impl", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde-impl", serde(rename_all = "camelCase"))]
pub struct BaseNode {
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub leading_comments: Vec<Comment>,
Expand Down

0 comments on commit c4fbdcd

Please sign in to comment.