jamiebrynes7 / spatialos-sdk-rs

Rust integration of the SpatialOS C API bindings
Apache License 2.0
21 stars 6 forks source link

Primitive schema type defaults #163

Closed Chris-Nicholls closed 4 years ago

Chris-Nicholls commented 4 years ago

Added defaults when deserialising primitive types, to match pbio as seen in https://github.com/improbable/protobuf-interop/blob/4f1363cf2522dc97eba7b669c00731a88b2de9e4/src/pbio.cc#L367

For some reason, default values are not present when sent from spatial, leading to errors when deseralising things such as Position(0,0,0)

codecov[bot] commented 4 years ago

Codecov Report

Merging #163 into master will decrease coverage by 0.06%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #163      +/-   ##
==========================================
- Coverage   13.83%   13.77%   -0.07%     
==========================================
  Files          39       39              
  Lines        3779     3796      +17     
==========================================
  Hits          523      523              
- Misses       3256     3273      +17     
Impacted Files Coverage Δ
spatialos-sdk/src/worker/schema/primitives.rs 33.60% <0.00%> (-0.28%) :arrow_down:
spatialos-sdk/src/worker/schema.rs 3.59% <0.00%> (-0.47%) :arrow_down:
cargo-spatial/src/errors.rs 0.00% <0.00%> (ø)
spatialos-sdk/src/worker/locator.rs 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a1e6c82...ec003d3. Read the comment docs.