diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2014-12-01 15:52:17 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2014-12-13 20:15:38 -0500 |
| commit | 65d3a40c07d1efae8039d3341a07ac748063fc79 (patch) | |
| tree | b51bce955970cc70c538c1e8180ca751b3f880c1 /src/libcore/num | |
| parent | c73259a269c11ba9cb2917f9459204b7dcaa9646 (diff) | |
| download | rust-65d3a40c07d1efae8039d3341a07ac748063fc79.tar.gz rust-65d3a40c07d1efae8039d3341a07ac748063fc79.zip | |
libcore: fix move semantics fallout
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 3c9b68b350b..2416cf5bcc7 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -37,8 +37,8 @@ use str::{FromStr, from_str, StrPrelude}; /// Simultaneous division and remainder #[inline] #[deprecated = "use division and remainder directly"] -pub fn div_rem<T: Div<T, T> + Rem<T, T>>(x: T, y: T) -> (T, T) { - (x / y, x % y) +pub fn div_rem<T: Clone + Div<T, T> + Rem<T, T>>(x: T, y: T) -> (T, T) { + (x.clone() / y.clone(), x % y) } /// Raises a `base` to the power of `exp`, using exponentiation by squaring. |
