Skip to content

Commit

Permalink
Impl Shr for &Int.
Browse files Browse the repository at this point in the history
  • Loading branch information
huonw committed Oct 22, 2015
1 parent b00750c commit 6559231
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1648,6 +1648,15 @@ impl Shr<usize> for Int {
}
}

impl<'a> Shr<usize> for &'a Int {
type Output = Int;

#[inline]
fn shr(self, other: usize) -> Int {
self.clone() >> other
}
}

impl ShrAssign<usize> for Int {
#[inline]
fn shr_assign(&mut self, other: usize) {
Expand Down

0 comments on commit 6559231

Please sign in to comment.