Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jettr
Copy link
Contributor

@jettr jettr commented Jul 9, 2021

Pull Request Overview

Instead of each object providing an empty implementation for a group trait, auto implement the group trait if the object has all of the necessary sub-traits.

Testing Strategy

cargo check on each CL

Documentation Updated

  • No documnetation update

Formatting

  • Ran make prepush.

Jett Rink added 5 commits July 9, 2021 15:25
Auto implement group traits if the underlying object has all of the sub
traits requires by the group trait. This means that all of the
implementors don't have to implmenent an empty group trait.

Change-Id: I2336a2d1df92bb2956935b15fab253b885c97138
Auto implement group traits if the underlying object has all of the sub
traits requires by the group trait. This means that all of the
implementors don't have to implmenent an empty group trait.

Change-Id: Ie775268b1fe4e8da44a06ea1c61dd481bf314b2b
Auto implement group trait if the underlying object has all of the sub
traits requires by the group trait. This means that all of the
implementors don't have to implmenent an empty group trait.

Change-Id: Ifae400a5458bfadc00cda41b5f5302c82e3b0cc9
Auto implement group trait if the underlying object has all of the sub
traits requires by the group trait. This means that all of the
implementors don't have to implmenent an empty group trait.

Change-Id: Iebe0a33b8929f7cbf00615f6049985a5f9989002
Auto implement group trait if the underlying object has all of the sub
traits requires by the group trait. This means that all of the
implementors don't have to implmenent an empty group trait.

Change-Id: I073b898993a3263e94db51bee1bccfddbc93502a
@github-actions github-actions bot added HIL This affects a Tock HIL interface. chips/nrf Change pertains to the nRF5x family of MCUs. chips/sam4l Change pertains to the SAM4L MCU. chips/stm32 Change pertains to the stm32 family of MCUSs labels Jul 9, 2021
@lschuermann
Copy link
Member

This is great!

The only thing which this would effectively prevent is that implementers of these HILs can't opt out of certain marker traits. I don't think that's an issue, but want to mention it nonetheless.

Copy link
Contributor

@bradjc bradjc left a comment

Choose a reason for hiding this comment

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

This seems like a net good thing.

@hudson-ayers hudson-ayers added the last-call Final review period for a pull request. label Jul 12, 2021
@jettr
Copy link
Contributor Author

jettr commented Jul 12, 2021

The only thing which this would effectively prevent is that implementers of these HILs can't opt out of certain marker traits. I don't think that's an issue, but want to mention it nonetheless.

I agree. We should only do this for convenience group traits, not marker traits. That is actually why I didn't implement this for the Timestamp trait since it seems like it might be a marker trait on Time instead of a group trait

@lschuermann
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 12, 2021

@bors bors bot merged commit 174d8ff into tock:master Jul 12, 2021
@jettr jettr deleted the auto_implement branch July 12, 2021 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chips/nrf Change pertains to the nRF5x family of MCUs. chips/sam4l Change pertains to the SAM4L MCU. chips/stm32 Change pertains to the stm32 family of MCUSs HIL This affects a Tock HIL interface. last-call Final review period for a pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants