Conversation
eholk
left a comment
There was a problem hiding this comment.
This seems like a nice ergonomic improvement. Thank you!
It looks like you need to sign the CLA, but I'd be happy to merge this patch once we're all good on that part.
src/lib.rs
Outdated
| if !StackFuture::<F, STACK_SIZE>::has_space_for::<F>() { | ||
| panic!("F is too large"); | ||
| concat_panic!( | ||
| "F is too large: ", |
There was a problem hiding this comment.
| "F is too large: ", | |
| "Future is too large: ", |
I feel like seeing Future instead of F will make it clearer to the user what is wrong. Maybe "Future F is too large" would be even clearer...
There was a problem hiding this comment.
Good idea. I changed the panic messages according to your suggestion and also suppressed the 'dead_code' linter errors in the tests.
src/lib.rs
Outdated
| if !StackFuture::<F, STACK_SIZE>::has_alignment_for::<F>() { | ||
| panic!("F has incompatible alignment"); | ||
| concat_panic!( | ||
| "F has incompatible alignment: ", |
There was a problem hiding this comment.
| "F has incompatible alignment: ", | |
| "Future has incompatible alignment: ", |
|
@microsoft-github-policy-service agree |
|
It looks like your CI is failing due to existing issues. I'll fix these over in #25. |
|
Ah, unfortunately, we both added the |
5029c4b to
611c6af
Compare
|
@eholk sorry for the late reply; I rebased the branch and dropped the last commit, should be fine now. |
|
Awesome, thanks! I just merged it. |
This PR adds support for printing detailed error messages when there is not enough space or an alignment mismatch.