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

enhance(arbiter-engine): remove <E, A> generics from World #748

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

Autoparallel
Copy link
Collaborator

Give an overview of the tasks completed
We wanted to not have the World struct have generics that come from the Engine<E,A> inside of the Agent struct. This PR fixes this by introducing a object-safe trait Entity that solely provides the interface to do Agent::run(). Minimal change with no breaks to tests. Changed the agent collection in World from Vec<Agent> to HashMap<String, Agent> while I was at it.

Link to issue(s) that this PR closes
Closes #747

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (c851c5e) 52.51% compared to head (c3a89c8) 52.45%.
Report is 1 commits behind head on main.

Files Patch % Lines
arbiter-engine/src/world.rs 0.00% 11 Missing ⚠️
arbiter-engine/src/agent.rs 0.00% 3 Missing ⚠️
arbiter-engine/src/examples.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #748      +/-   ##
==========================================
- Coverage   52.51%   52.45%   -0.06%     
==========================================
  Files          36       36              
  Lines        7293     7301       +8     
==========================================
  Hits         3830     3830              
- Misses       3463     3471       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@0xJepsen 0xJepsen left a comment

Choose a reason for hiding this comment

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

lgtm

@0xJepsen 0xJepsen merged commit 8b0f8d0 into main Dec 14, 2023
11 checks passed
@0xJepsen 0xJepsen deleted the arbiter-engine/remove-agent-generics branch December 14, 2023 22:53
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.

enhance(arbiter-engine): remove the bubbled up E, A generics from World.
2 participants