sifis-home / wot-td

Rust crate to produce and consume Web Of Things Thing Descriptions
13 stars 2 forks source link

Support both inclusive & exclusive minimum/maximum values #74

Closed dodomorandi closed 2 years ago

dodomorandi commented 2 years ago

I explicitly decided to allow either the inclusive or the exclusive variant, never both. This could seems arbitrarily strict, but it avoids a level of ambiguity that something would have to handle at some point. It seems a reasonable solution.

Let me know if we want to have a custom Deserialize impl in order to allow bogus json with both inclusive and exclusive variants.

codecov-commenter commented 2 years ago

Codecov Report

Merging #74 (f2a54fe) into master (bbb3e66) will decrease coverage by 0.24%. The diff coverage is 89.18%.

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
- Coverage   96.92%   96.67%   -0.25%     
==========================================
  Files           8        8              
  Lines       11756    12118     +362     
==========================================
+ Hits        11394    11715     +321     
- Misses        362      403      +41     
Impacted Files Coverage Δ
src/builder/data_schema.rs 96.56% <43.85%> (-0.85%) :arrow_down:
src/thing.rs 94.27% <97.12%> (+0.60%) :arrow_up:
src/builder.rs 97.83% <100.00%> (ø)
src/builder/affordance.rs 96.15% <100.00%> (ø)

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