BrettMayson / arma-rs

GNU General Public License v2.0
42 stars 8 forks source link

Add group specific state #38

Closed Eathox closed 1 year ago

Eathox commented 1 year ago

Expands the state functionality by allowing each group to have their own state. Additionally GlobalContext and GroupContext where added to allow access to either the global or group specific state.

I have also decided to rename ArmaContext to ArmaInfo since it mostly serves as QOL struct to allow for just one unwrap. I'm still some what torn on this and am slowly leaning towards that it's get functions should directly become part of Context since this would better allow for the addition new fields should that ever come to pass. Will make an other PR for changes to ArmaContext.

Please let me know if there's anything you'd like changed.

codecov[bot] commented 1 year ago

Codecov Report

Merging #38 (f6ec40a) into main (5329232) will increase coverage by 0.30%. The diff coverage is 95.23%.

:exclamation: Current head f6ec40a differs from pull request most recent head 0caa904. Consider uploading reports for the commit 0caa904 to get more accurate results

@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   83.09%   83.39%   +0.30%     
==========================================
  Files          27       29       +2     
  Lines         982     1012      +30     
==========================================
+ Hits          816      844      +28     
- Misses        166      168       +2     
Impacted Files Coverage Δ
arma-rs-example/src/lib.rs 94.44% <ø> (-0.30%) :arrow_down:
arma-rs/src/context/global.rs 60.00% <60.00%> (ø)
arma-rs-example/src/counter.rs 100.00% <100.00%> (ø)
arma-rs/src/context/group.rs 100.00% <100.00%> (ø)
arma-rs/src/context/mod.rs 91.30% <100.00%> (+1.83%) :arrow_up:
arma-rs/src/group.rs 100.00% <100.00%> (ø)
arma-rs/src/lib.rs 96.84% <100.00%> (-0.07%) :arrow_down:
arma-rs/src/testing.rs 72.72% <100.00%> (ø)

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.