Skip to content

Generics Part 1 #331

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

Closed
wants to merge 1 commit into from
Closed

Conversation

burrbull
Copy link
Member

@burrbull burrbull commented Jul 24, 2019

r? @therealprof

I decided to split my changes on 3 steps:

1 - this one adds Reg Wrapper for register struct with read, write and other methods (instead of traits we discussed) and replace register's R and W on generic versions.

2 - replace field reader with generic R

3 - replace write proxy with generic WProxy (require const generics in rust) (see #115 )

Example: https://gist.github.com/24a0d1a2e13bb464a7c579a07902a3c6

@burrbull burrbull requested a review from a team as a code owner July 24, 2019 09:06
@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-tools labels Jul 24, 2019
This was referenced Jul 24, 2019
});
}

if can_write {
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

Uhm, conflict markers?

Copy link
Member Author

Choose a reason for hiding this comment

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

It happens.
Fixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, just makes me wonder how you actually tested this... 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

I made merge after PR and tests.

@burrbull
Copy link
Member Author

Rebased on master. Added Safe/Unsafe marker structs.

This part should not break HALs, but I'm not sure.

@burrbull
Copy link
Member Author

Close in favour of #339

@burrbull burrbull closed this Jul 26, 2019
This was referenced Jul 27, 2019
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