Honestly hoping the RangeBounds trait will eventually get more methods like `.unwrap_or()`. Probably needs to land in stable first though https://doc.rust-lang.org/std/ops/trait.RangeBounds.html …
-
-
Hmmm, that name though doesn’t carry what it does. Something like `clamp` seems more appropriate.
-
Ohh yeah, that sounds better actually! Could be used to set both a lower and upper limit in a single go. Nice :D
- 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.