rust: pneumatic testbed setup deprecated
Opened this issue · 5 comments
tracernz commented
Aircraft Version
Development
Description
Needs setup to use the new method. Good first issue for rust enthusiasts.
warning: use of deprecated associated function `simulation::update_context::UpdateContext::new`: Do not create UpdateContext directly. Instead use the SimulationTestBed or your own custom test bed.
--> fbw-common/src/wasm/systems/systems/src/pneumatic/valve.rs:671:24
|
671 | UpdateContext::new(
| ^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated associated function `simulation::update_context::UpdateContext::new`: Do not create UpdateContext directly. Instead use the SimulationTestBed or your own custom test bed.
--> fbw-common/src/wasm/systems/systems/src/pneumatic/mod.rs:1038:24
|
1038 | UpdateContext::new(
| ^^^
References (optional)
No response
Additional info (optional)
No response
Discord Username (optional)
No response
2hwk commented
See some other examples in hydraulic, air conditioning test.rs etc. It's what the warning states, for unit testing, use SimulationTestBed
test_bed vs UpdateContext
EDIT: Note that if this is still unclear to you, it may be better to leave this to somebody else with more experience with rs
as its important that the unit tests that these cover still work (and test) correctly after the refactor.
tracernz commented
@tracernz can you tell me what I need to do in it?
Not sure, that's why I didn't do it. ;)
tracernz commented
Do note that this is a good first issue for somebody already familiar with rust; not for a novice rust programmer.