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

Impossible to construct phy::DeviceLimits #39

Closed
phil-opp opened this issue Sep 8, 2017 · 2 comments
Closed

Impossible to construct phy::DeviceLimits #39

phil-opp opened this issue Sep 8, 2017 · 2 comments

Comments

@phil-opp
Copy link
Contributor

phil-opp commented Sep 8, 2017

The phy::DeviceLimits struct has a private dummy field, which makes meaningful construction impossible. The only way is through the Default implementation, but this yields a max_transmission_unit of 0…

A DeviceLimits struct is required for implementing the limits method of the phy::Device trait.

@whitequark
Copy link
Contributor

Something like:

DeviceLimits { max_transmission_unit: 1536, ..default() }

This is actually in the docs.

Sorry, something went wrong.

@phil-opp
Copy link
Contributor Author

phil-opp commented Sep 8, 2017

Thanks!

Sorry, something went wrong.

@phil-opp phil-opp closed this as completed Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants