Skip to content

pinocchio/interface: Add sealed trait to Transmute#143

Merged
febo merged 1 commit intomainfrom
febo/sealed-transmute
Mar 26, 2026
Merged

pinocchio/interface: Add sealed trait to Transmute#143
febo merged 1 commit intomainfrom
febo/sealed-transmute

Conversation

@febo
Copy link
Copy Markdown
Contributor

@febo febo commented Mar 26, 2026

Problem

Currently, pinocchio interface uses a Transmute trait to specify the logic for loading account types. This is an unsafe and internal-only trait, but at the same time, it needs to be public.

Solution

Add a sealed trait to prevent external implementations of the Transmute trait. This does not add any runtime overhead.

cc: @d0nutptr

@febo febo requested a review from joncinque March 26, 2026 11:03
Copy link
Copy Markdown
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@febo febo merged commit ac14e9f into main Mar 26, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants