From 8ac6a62a6e79d5c2743b8d3180a96e460243a491 Mon Sep 17 00:00:00 2001 From: lcnr/Bastian Kauschke Date: Wed, 6 Mar 2019 12:47:12 +0100 Subject: [PATCH 1/2] fix unsigned_shr docs --- src/int.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/int.rs b/src/int.rs index 22f2713..3016d23 100644 --- a/src/int.rs +++ b/src/int.rs @@ -171,8 +171,8 @@ pub trait PrimInt: /// ``` /// use num_traits::PrimInt; /// - /// let n = 0xFEDCBA9876543210i64; - /// let m = 0x000FEDCBA9876543i64; + /// let n = 0x0123456789ABCDEFi64; + /// let m = 0x0000123456789ABCi64; /// /// assert_eq!(n.unsigned_shr(12), m); /// ``` From 9cd24222211077a99acb888e8900aafef7e51149 Mon Sep 17 00:00:00 2001 From: lcnr/Bastian Kauschke Date: Thu, 7 Mar 2019 17:22:19 +0100 Subject: [PATCH 2/2] fix --- src/int.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/int.rs b/src/int.rs index 3016d23..03142f3 100644 --- a/src/int.rs +++ b/src/int.rs @@ -171,10 +171,10 @@ pub trait PrimInt: /// ``` /// use num_traits::PrimInt; /// - /// let n = 0x0123456789ABCDEFi64; - /// let m = 0x0000123456789ABCi64; + /// let n = -8i8; // 0b11111000 + /// let m = 62i8; // 0b00111110 /// - /// assert_eq!(n.unsigned_shr(12), m); + /// assert_eq!(n.unsigned_shr(2), m); /// ``` fn unsigned_shr(self, n: u32) -> Self;