Skip to content

Commit

Permalink
transparent makes rename redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
ahl committed Dec 24, 2024
1 parent 83133a4 commit 2a2d1d5
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions typify-impl/src/type_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ impl TypeEntry {
) {
let TypeEntryNewtype {
name,
rename,
rename: _,
description,
default,
type_id,
Expand All @@ -1241,12 +1241,6 @@ impl TypeEntry {
} = newtype_details;
let doc = make_doc(name, description.as_ref(), schema);

let serde = rename.as_ref().map(|old_name| {
quote! {
#[serde(rename = #old_name)]
}
});

let type_name = format_ident!("{}", name);
let inner_type = type_space.id_to_entry.get(type_id).unwrap();
let inner_type_name = inner_type.type_ident(type_space, &None);
Expand Down Expand Up @@ -1537,7 +1531,6 @@ impl TypeEntry {
let item = quote! {
#doc
#[derive(#(#derives),*)]
#serde
#[serde(transparent)]
pub struct #type_name(#vis #inner_type_name);

Expand Down

0 comments on commit 2a2d1d5

Please sign in to comment.