https://github.com/rust-lang/rust/pull/58710 was just merged into master. This may be cause to deprecate the `num::clamp` function in the near future.