Comment

Comment by simpaticoder

What if the valid input for quantity must be greater than 0? A reasonable constraint, I think. The OP's example is contrived to line up with Rust's built-in types, and ignores the general problem.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton