-
Notifications
You must be signed in to change notification settings - Fork 234
Make the digital::{v1, v2}::InputPin traits proven #164
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thejpster (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with removing the unproven
feature from digital::v2
but we absolutely don't want a breaking change to put something proven behind a feature gate.
@therealprof I don't understand what you said. Do you mean that the I did not remove the And keeping the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a compatibility hazard to add feature gates to code which was previously unguarded. I'm fine with any change which doesn't break compatbility with existing applications.
src/digital/v2_compat.rs
Outdated
@@ -115,6 +117,7 @@ mod tests { | |||
} | |||
} | |||
|
|||
#[cfg(feature = "unproven")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You added this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v1::StatefulOutputPin
is unproven
, so this test wouldn't build without the flag anyway.
src/digital/v2_compat.rs
Outdated
@@ -140,10 +144,12 @@ mod tests { | |||
} | |||
} | |||
|
|||
#[cfg(feature = "unproven")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v2::ToggleableOutputPin
is unproven
, so this test wouldn't build without the flag anyway.
src/digital/v2_compat.rs
Outdated
struct NewToggleablePinConsumer<T: v2::ToggleableOutputPin> { | ||
_pin: T, | ||
} | ||
|
||
#[cfg(feature = "unproven")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v2::ToggleableOutputPin
is unproven
, and NewToggleablePinConsumer
depends on it, so this test wouldn't build without the flag anyway.
src/digital/v2_compat.rs
Outdated
@@ -153,6 +159,7 @@ mod tests { | |||
} | |||
} | |||
|
|||
#[cfg(feature = "unproven")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as #164 (comment)
I added these |
8892f44
to
c3d4922
Compare
Remove them. |
See rust-embedded#41 for more details about this trait. Removes the feature flag from v2 implementation Keeps it on v1 because it would not make sense to prove a deprecated feature.
26b5b18
to
bea9bb6
Compare
Side effect: make the compat traits proven
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a CHANGELOG.md entry, then this should be ready to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
bors r+ |
Build succeeded |
See #41
Previous attempt : #102