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

feat: make Executor trait object safe #249

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

kyle-mccarthy
Copy link
Contributor

I moved the Sized bound from the Executor trait to the two initializer methods. This makes the trait object safe, allowing for the following

struct Context {
    engine: Arc<dyn Executor>
}

@williamhogman williamhogman merged commit 6c274b1 into sobelio:main Jan 10, 2024
2 of 3 checks passed
@chenwanqq
Copy link

chenwanqq commented May 16, 2024

I think this change didn't work? I found it's still not object safe.
struct SimpleWriteCode {
executor: Box,
}
and this Executor shows a 'cannot be made into an object' error

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.

3 participants