From 248e2549dde5eb3675f2efd629255434c81de968 Mon Sep 17 00:00:00 2001 From: Zach Dziura Date: Tue, 10 Nov 2015 15:06:17 -0500 Subject: [PATCH] Added arithmetic operations for `Int`s --- src/prime.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/prime.rs b/src/prime.rs index 1294b7d..d5d10d8 100644 --- a/src/prime.rs +++ b/src/prime.rs @@ -97,7 +97,11 @@ static SMALL_PRIMES: [u32; 999] = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, /// as well. `Prime`s simply claim that the number you're dealing with is a /// prime number. custom_derive! { - #[derive(Debug, NewtypeAdd, NewtypeSub, NewtypeMul, NewtypeDiv)] + #[derive(Debug, + NewtypeAdd, NewtypeAdd(Int), + NewtypeSub, NewtypeSub(Int), + NewtypeMul, NewtypeMul(Int), + NewtypeDiv, NewtypeDiv(Int))] pub struct Prime(Int); }