async-std icon indicating copy to clipboard operation
async-std copied to clipboard

Enforce non zero capacity for channel

Open Licenser opened this issue 5 years ago • 5 comments

This aligns the function with it's documentation and will result in easier to resolve errors for problems such as #712.

closes #712

Licenser avatar Feb 24 '20 09:02 Licenser

this fails in quite a few places but I don't think those failures are related to my changes

Licenser avatar Feb 24 '20 09:02 Licenser

I've been doing some thinking and perhaps instead of guarding against zero we could use the type checker to make sure that we never get zero by using NonZeroUsize what do you think?

Licenser avatar Feb 24 '20 16:02 Licenser

ah strike that, it requires to be manually wrapped, however, it could be used for the internal functions? as in the Channel struct

Licenser avatar Feb 24 '20 16:02 Licenser

this fails in quite a few places but I don't think those failures are related to my changes

I think it can be fixed by rebase master.

k-nasa avatar Mar 09 '20 00:03 k-nasa

Sorry for the late reply / rebase, got dragged into $otherrthings :tm:

Licenser avatar Mar 11 '20 19:03 Licenser