Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
FIX: Use the name 'constructor' if there is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed Oct 10, 2023
1 parent c184bc7 commit 39a88d2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,12 @@ impl InternalStructs {
{
let is_event = item.type_field == "event";

if let Some(name) = item.name {
let name = match item.name {
None if item.type_field == "constructor" => Some("constructor".to_owned()),
other => other,
};

if let Some(name) = name {
for (idx, input) in item.inputs.into_iter().enumerate() {
if let Some(ty) = input
.internal_type
Expand Down

0 comments on commit 39a88d2

Please sign in to comment.