Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make HostComponentDataHandle::from_any non-pub & non-unsafe #1542

Merged
merged 1 commit into from
May 26, 2023

Conversation

lann
Copy link
Collaborator

@lann lann commented May 25, 2023

Not only was this not really unsafe, even the type-unsafety wasn't really necessary. Replaced with a safe(er) From. Kept the (private) method to dedupe some internal logic.

Also added notes about panicing to docs.

@lann lann requested review from rylev and karthik2804 May 25, 2023 18:43
Not only was this not really `unsafe`, it doesn't really need to be
`pub`.

Also added notes about panicing to docs.

Signed-off-by: Lann Martin <lann.martin@fermyon.com>
@lann lann changed the title Remove "unsafe" HostComponentDataHandle::from_any Make HostComponentDataHandle::from_any non-pub & non-unsafe May 25, 2023
@lann lann merged commit c2c6e81 into fermyon:main May 26, 2023
@lann lann deleted the dhc-handle branch May 26, 2023 13:33
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