pub(crate) fn max<S: PartialOrd + Copy>(lhs: S, rhs: S) -> S