Skip to content

Commit 9fb9ad6

Browse files
committed
Add methods for lshift and rshift to the wrapping trait.
1 parent 648e1b1 commit 9fb9ad6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

text/0000-integer-overflow.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ pub trait WrappingOps {
183183
fn wrapping_mul(self, rhs: Self) -> Self;
184184
fn wrapping_div(self, rhs: Self) -> Self;
185185
fn wrapping_rem(self, rhs: Self) -> Self;
186-
186+
187+
fn wrapping_lshift(self, amount: u32) -> Self;
188+
fn wrapping_rshift(self, amount: u32) -> Self;
189+
187190
fn wrapping_as_u8(self, rhs: Self) -> u8;
188191
fn wrapping_as_u16(self, rhs: Self) -> u16;
189192
fn wrapping_as_u32(self, rhs: Self) -> u32

0 commit comments

Comments
 (0)