Skip to content

refactor: remove redundant IO entry constructors#553

Merged
sjudson merged 2 commits intonexus-xyz:mainfrom
Forostovec:refactor/emulator-ioentry-constructors
Dec 11, 2025
Merged

refactor: remove redundant IO entry constructors#553
sjudson merged 2 commits intonexus-xyz:mainfrom
Forostovec:refactor/emulator-ioentry-constructors

Conversation

@Forostovec
Copy link
Contributor

Removed the inherent new constructors from MemoryInitializationEntry and PublicOutputEntry, which duplicated the implementations generated by the io! macro via the IOEntry trait. All internal call sites that used MemoryInitializationEntry::new are updated to use explicit struct literals instead, keeping construction simple and consistent while avoiding two parallel ways to create the same types.

@sjudson
Copy link
Contributor

sjudson commented Dec 11, 2025

@Forostovec I'm fine with removing the redundant new() implementations, but using ::new() to create the types is quite idiomatic, and I find it generally preferable to direct construction (especially because if in the future you want to add some default information in you don't have to go and alter all the constructor sites).

So if you'd like to remove those changes and limit this PR to just removing the redundant implementation then I'll be happy to accept it.

@sjudson sjudson merged commit 74542a0 into nexus-xyz:main Dec 11, 2025
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants