chore: Remove send + sync bound on executor#2156
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the Send + Sync trait bounds from the Executor type in the VmExecutionConfig trait. The change is made possible by refactoring the filtered_execution_frequencies method to use zip_eq and filter_map instead of enumerate and separate indexing, eliminating the need for thread-safety constraints on the executor type.
- Removed
Send + Syncbounds fromVmExecutionConfig::Executortrait - Refactored
filtered_execution_frequenciesmethod to use iterator combinators instead of indexing - Simplified the filtering logic using
filter_mapandthen_some
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/vm/src/arch/config.rs | Removed Send + Sync trait bounds from the Executor associated type |
| crates/vm/src/arch/interpreter_preflight.rs | Refactored method implementation to eliminate need for Send + Sync bounds and improved iterator usage |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@Schaeff there is some clippy/fmt issue |
|
The CI errors are something about |
|
@Schaeff please try to fix the CI issues again |
|
The other two tests are failing for unrelated reasons |
It is not required after a small refactor.