about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorLinus Färnstrand <faern@faern.net>2020-03-27 22:15:02 +0100
committerLinus Färnstrand <faern@faern.net>2020-04-03 09:33:10 +0200
commitc0ec0a27b3ed532c0ce58a2ad2f4dcd3d939210a (patch)
treee00113ab406180461be0f7089eb7088301527b92 /src/liballoc
parente9ce03648d293975e5b208b1b03b503270b80bde (diff)
downloadrust-c0ec0a27b3ed532c0ce58a2ad2f4dcd3d939210a.tar.gz
rust-c0ec0a27b3ed532c0ce58a2ad2f4dcd3d939210a.zip
Replace max/min_value() with MAX/MIN assoc consts
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/slice.rs2
-rw-r--r--src/liballoc/str.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index d8fc1faca3a..2ce5bc8ed2f 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -432,7 +432,7 @@ impl<T> [T] {
     ///
     /// ```should_panic
     /// // this will panic at runtime
-    /// b"0123456789abcdef".repeat(usize::max_value());
+    /// b"0123456789abcdef".repeat(usize::MAX);
     /// ```
     #[stable(feature = "repeat_generic_slice", since = "1.40.0")]
     pub fn repeat(&self, n: usize) -> Vec<T>
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index 843a2f1f8e9..70860c09a2c 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -499,7 +499,7 @@ impl str {
     ///
     /// ```should_panic
     /// // this will panic at runtime
-    /// "0123456789abcdef".repeat(usize::max_value());
+    /// "0123456789abcdef".repeat(usize::MAX);
     /// ```
     #[stable(feature = "repeat_str", since = "1.16.0")]
     pub fn repeat(&self, n: usize) -> String {