提交 d9281064 编写于 作者: A Andreas Liljeqvist

Simplify zero check

上级 32d7e5b7
......@@ -710,7 +710,7 @@ pub fn contains(&self, v: u128) -> bool {
/// Equal to `range.contains(0)` but should be faster.
#[inline]
pub fn contains_zero(&self) -> bool {
!(self.start <= self.end && self.start != 0)
self.start > self.end || self.start == 0
}
/// Returns new `WrappingRange` with replaced `start`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册