Skip to content

Fix overly strict lifetime requirements for deserialization helpers#291

Merged
ohuopio merged 3 commits intoAtostek:masterfrom
dora-rs:improvements
Jul 24, 2023
Merged

Fix overly strict lifetime requirements for deserialization helpers#291
ohuopio merged 3 commits intoAtostek:masterfrom
dora-rs:improvements

Conversation

@phil-opp
Copy link
Contributor

And other improvements:

  • Don't deny clippy lints to avoid breakage when new lints are created
  • Add Key bound on Keyed::K so that we don't need to specify it on every usage

Clippy frequently adds new lints. We don't want the build to break then.
@phil-opp
Copy link
Contributor Author

Happy to split this up into separate PRs if you prefer.

    There is no need for the input data to live exactly as long as the deserializer.
    This way we don't need to specify the bound everywhere.
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.09 ⚠️

Comparison is base (3b4f224) 70.44% compared to head (48890c5) 70.36%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #291      +/-   ##
==========================================
- Coverage   70.44%   70.36%   -0.09%     
==========================================
  Files         111      111              
  Lines       20278    20261      -17     
==========================================
- Hits        14285    14256      -29     
- Misses       5993     6005      +12     
Impacted Files Coverage Δ
src/dds/key.rs 64.47% <ø> (ø)
src/dds/pubsub.rs 85.95% <ø> (-0.10%) ⬇️
src/dds/with_key/datareader.rs 84.41% <ø> (ø)
src/dds/with_key/datasample.rs 40.35% <0.00%> (+2.01%) ⬆️
src/dds/with_key/datasample_cache.rs 81.34% <ø> (ø)
src/dds/with_key/datawriter.rs 60.18% <ø> (ø)
src/dds/with_key/simpledatareader.rs 54.57% <ø> (ø)
src/lib.rs 100.00% <ø> (ø)
src/ros2/ros_node.rs 50.27% <ø> (+0.27%) ⬆️
src/test/test_properties.rs 100.00% <ø> (ø)
... and 1 more

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jhelovuo
Copy link
Member

Thanks. This is much appreciated. It seems that specifying trait bounds on an associated type works now better than it did ~3 years ago.

@ohuopio ohuopio merged commit bef56b2 into Atostek:master Jul 24, 2023
@ohuopio
Copy link
Collaborator

ohuopio commented Jul 24, 2023

Yes, these seem to be good improvements. Thank you!

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.

4 participants