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

Remove DynamicOneShot trait. #19

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

reitermarkus
Copy link
Contributor

@reitermarkus reitermarkus commented Jan 18, 2024

From reading #10 (comment), it looks like adding this trait didn't actually solve the issue.

Depending on the device, this also allows reading invalid channels.

@reitermarkus reitermarkus force-pushed the remove-dynamic-one-shot branch 5 times, most recently from fe3a67a to 78aafb3 Compare January 19, 2024 14:21
Copy link
Owner

@eldruin eldruin left a comment

Choose a reason for hiding this comment

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

Thanks! I fixed the CI now, could you rebase the PRs?

@reitermarkus reitermarkus force-pushed the remove-dynamic-one-shot branch from 78aafb3 to bd95c9c Compare January 29, 2024 21:49
@coveralls
Copy link

coveralls commented Jan 29, 2024

Coverage Status

coverage: 81.385% (+0.2%) from 81.197%
when pulling 4f46a6e on reitermarkus:remove-dynamic-one-shot
into 0ff4c7b on eldruin:master.

@reitermarkus
Copy link
Contributor Author

@eldruin, rebased the PRs.

Copy link
Owner

@eldruin eldruin left a comment

Choose a reason for hiding this comment

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

Thanks, I added some comments.

@@ -235,7 +235,7 @@ impl BitFlags {
}

pub mod channel;
pub use channel::{ChannelId, ChannelSelection};
pub use channel::ChannelId;
Copy link
Owner

Choose a reason for hiding this comment

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

I do not think we should expose ChannelSelection publicly.

Copy link
Contributor Author

@reitermarkus reitermarkus Jan 30, 2024

Choose a reason for hiding this comment

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

It isn't.

#[doc = $doc]
$CH,
)+
mod private {
Copy link
Owner

Choose a reason for hiding this comment

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

Why do you move this module inside this macro?

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This way the ChannelId is sealed by making ChannelSelection private.


/// Marker type for an ADC input channel.
pub trait ChannelId<T>: private::Sealed {
pub trait ChannelId<T> {
Copy link
Owner

Choose a reason for hiding this comment

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

Why should this trait not be sealed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is actually sealed since the ChannelSelection type is private.

@reitermarkus reitermarkus force-pushed the remove-dynamic-one-shot branch from d796952 to dad963e Compare January 30, 2024 16:24
@reitermarkus reitermarkus requested a review from eldruin January 30, 2024 16:24
@reitermarkus reitermarkus force-pushed the remove-dynamic-one-shot branch from dad963e to 4f46a6e Compare February 19, 2024 06:58
@reitermarkus
Copy link
Contributor Author

@eldruin, can you have another look here? Thanks.

@reitermarkus
Copy link
Contributor Author

@eldruin, please review this again. Thanks.

Copy link
Owner

@eldruin eldruin left a comment

Choose a reason for hiding this comment

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

Sorry for the delay @reitermarkus. Thank you for your work.

@eldruin eldruin merged commit 00830f4 into eldruin:master Jun 10, 2024
22 checks passed
@reitermarkus reitermarkus deleted the remove-dynamic-one-shot branch November 21, 2024 21:24
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.

3 participants