Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Default on structs #152

Merged
merged 4 commits into from
Mar 1, 2022
Merged

Derive Default on structs #152

merged 4 commits into from
Mar 1, 2022

Conversation

arlyon
Copy link
Owner

@arlyon arlyon commented Jan 30, 2022

Closes #131

Note this expands the macros to support a default attribute which is passed to smart-default.

  • use smart-default elsewhere in code, rather than a manual impl

@arlyon arlyon marked this pull request as draft January 31, 2022 06:36
@arlyon arlyon marked this pull request as ready for review February 1, 2022 03:09
@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #152 (6d1521c) into master (496de27) will decrease coverage by 0.42%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #152      +/-   ##
=========================================
- Coverage    4.86%   4.43%   -0.43%     
=========================================
  Files         117     119       +2     
  Lines        9215   10102     +887     
=========================================
  Hits          448     448              
- Misses       8767    9654     +887     
Impacted Files Coverage Δ
openapi/src/main.rs 0.00% <ø> (ø)
src/ids.rs 34.85% <0.00%> (-0.61%) ⬇️
src/params.rs 34.09% <0.00%> (-0.80%) ⬇️
src/resources/balance_transaction_ext.rs 0.00% <0.00%> (ø)
src/resources/card.rs 0.00% <0.00%> (ø)
src/resources/generated/account.rs 1.86% <0.00%> (-0.34%) ⬇️
src/resources/generated/account_link.rs 0.00% <0.00%> (ø)
src/resources/generated/alipay_account.rs 0.00% <ø> (ø)
src/resources/generated/api_errors.rs 0.00% <0.00%> (ø)
src/resources/generated/application.rs 0.00% <ø> (ø)
... and 82 more

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 496de27...6d1521c. Read the comment docs.

@FL33TW00D
Copy link
Contributor

@arlyon What's left on this? anything you need a hand with?

@arlyon
Copy link
Owner Author

arlyon commented Feb 20, 2022

I just need to rejigger the manual default derives to use smart default where possible otherwise we're good to go. One thing is that this may lead to wacky code in certain places if you declare use ..Default:: default() and don't consider the implications. If you'd like to check over the defaults that would be nice.

@arlyon arlyon merged commit af95ea4 into master Mar 1, 2022
@arlyon arlyon deleted the feat/default branch April 2, 2022 10:35
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.

Add default tag
2 participants