Skip to content

Commit

Permalink
refactor(ast): shorten code for impl Serialize for Elision (#8940)
Browse files Browse the repository at this point in the history
Small refactor. Just shorten code.
  • Loading branch information
overlookmotel committed Feb 7, 2025
1 parent 640db88 commit 515eb52
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/oxc_ast/src/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,9 @@ impl Program<'_> {
}
}

/// Serialize `ArrayExpressionElement::Elision` variant as `null` in JSON
/// Serialize `ArrayExpressionElement::Elision` variant as `null`.
impl Serialize for Elision {
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
serializer.serialize_none()
}
}
Expand Down

0 comments on commit 515eb52

Please sign in to comment.