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

Reduce size of Grants for Framed operation #47

Closed
jamesmunns opened this issue Apr 6, 2020 · 2 comments
Closed

Reduce size of Grants for Framed operation #47

jamesmunns opened this issue Apr 6, 2020 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@jamesmunns
Copy link
Owner

Right now, the hdr_len field of FrameGrantW and FrameGrantR is of type usize, though the only possible values are 0..=9, as these are the only possible lengths of the header.

It would be good to change the type from usize to u8, and handle this appropriately in all handling code. This should be as easy as changing the types, and fixing any compilation errors. We should add debug asserts as well to ensure there have not been any logic errors.

@jamesmunns jamesmunns added help wanted Extra attention is needed good first issue Good for newcomers labels Apr 6, 2020
@jamesmunns jamesmunns changed the title Reduce grant size for Framed operation Reduce size of Grants for Framed operation Apr 6, 2020
@yazdan
Copy link
Contributor

yazdan commented Apr 6, 2020

Hi I'd be happy to help

yazdan added a commit to yazdan/bbqueue that referenced this issue Apr 7, 2020
jamesmunns pushed a commit that referenced this issue Apr 7, 2020
* Reduce size of Grants for Framed operation #47

* using `into` instead of `as` for casting smaller sized variables safely

* avoid some additional casting

* :( a typo
@jamesmunns
Copy link
Owner Author

Closed by #53!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants