Skip to content

Conversation

@burrbull
Copy link
Member

No description provided.

@burrbull burrbull requested a review from a team as a code owner January 15, 2020 16:22
@rust-highfive
Copy link

r? @therealprof

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools labels Jan 15, 2020
@therealprof
Copy link
Contributor

What's the benefit of this change?

@burrbull burrbull force-pushed the reset-value branch 5 times, most recently from 275b3d2 to 8368d3b Compare June 2, 2020 05:26
@burrbull
Copy link
Member Author

burrbull commented Jun 2, 2020

@therealprof This change is very important in fact.

The advantages are:

  1. RawType::Ux is auto-implemented for all registers and can't be implemented in incorrect way somewhere else.
    Same time not all registers can have ResetValue.
  2. Slightly less of generated code.
  3. RawType trait can be used in other interfaces.
    For example, several months ago I experimented with wrapper Read/Write/Modify/SetBits traits (draft is here). The truth is I have not come up with a real application for them.
  4. I wanted to do it a long time ago.

Copy link
Contributor

@therealprof therealprof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. LGTM.

bors r+

@bors bors bot merged commit d894fd1 into master Jun 2, 2020
@bors bors bot deleted the reset-value branch June 2, 2020 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants