Skip to main content

positive

Function positive 

Source
pub fn positive(s: &str) -> Result<usize, String>
Expand description

A count of things, which must be at least one.

Not bytes(): a queue depth of 4k would read as 4,096 there and mean 4,000 to whoever typed it, and a slot is not a byte. Zero is refused rather than silently meaning “rendezvous channel”, which is what mpsc::channel(0) would panic on and what an operator typing it would never intend.