diff options
| author | Lzu Tao <taolzu@gmail.com> | 2020-06-02 07:59:11 +0000 |
|---|---|---|
| committer | Lzu Tao <taolzu@gmail.com> | 2020-06-10 01:35:47 +0000 |
| commit | fff822fead6249671cbcb090b24bce58fab38de0 (patch) | |
| tree | 417a72d52d12d147a03535fe7cbe465b3bcdb695 /src/liballoc/rc.rs | |
| parent | 283522400b5c13dfdf2b7e608e63a70ee8e3d7af (diff) | |
| download | rust-fff822fead6249671cbcb090b24bce58fab38de0.tar.gz rust-fff822fead6249671cbcb090b24bce58fab38de0.zip | |
Migrate to numeric associated consts
Diffstat (limited to 'src/liballoc/rc.rs')
| -rw-r--r-- | src/liballoc/rc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 925bc7d3c02..0327a9f9a96 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -2034,7 +2034,7 @@ trait RcBoxPtr<T: ?Sized> { // The reference count will never be zero when this is called; // nevertheless, we insert an abort here to hint LLVM at // an otherwise missed optimization. - if strong == 0 || strong == usize::max_value() { + if strong == 0 || strong == usize::MAX { abort(); } self.inner().strong.set(strong + 1); @@ -2058,7 +2058,7 @@ trait RcBoxPtr<T: ?Sized> { // The reference count will never be zero when this is called; // nevertheless, we insert an abort here to hint LLVM at // an otherwise missed optimization. - if weak == 0 || weak == usize::max_value() { + if weak == 0 || weak == usize::MAX { abort(); } self.inner().weak.set(weak + 1); |
