ZenGo-X / class

Rust library for building IQC: cryptography based on class groups of imaginary quadratic orders
GNU General Public License v3.0
63 stars 31 forks source link

address issues 10 #15

Closed HAOYUatHZ closed 5 years ago

HAOYUatHZ commented 5 years ago

https://github.com/KZen-networks/class-groups/blob/master/src/lib.rs#L178

HAOYUatHZ commented 5 years ago

@amanusk i have fixed my PR according to ur comments, would u like to take a look again ?

couldn't find the "re-request review from" button on github

amanusk commented 5 years ago

@HAOYUatHZ, thanks, this still does not compile:

rror[E0204]: the trait `Copy` may not be implemented for this type
  --> src/lib.rs:42:10
   |
42 | #[derive(Copy, Clone)]
   |          ^^^^
43 | pub struct Matrix22 {
44 |     pub a11: BigInt,
   |     --------------- this field does not implement `Copy`
45 |     pub a12: BigInt,
   |     --------------- this field does not implement `Copy`
46 |     pub a21: BigInt,
   |     --------------- this field does not implement `Copy`
47 |     pub a22: BigInt,
   |     --------------- this field does not implement `Copy`

The problem is the Copy trait of BigInt not Matrix22

HAOYUatHZ commented 5 years ago

@HAOYUatHZ, thanks, this still does not compile:

rror[E0204]: the trait `Copy` may not be implemented for this type
  --> src/lib.rs:42:10
   |
42 | #[derive(Copy, Clone)]
   |          ^^^^
43 | pub struct Matrix22 {
44 |     pub a11: BigInt,
   |     --------------- this field does not implement `Copy`
45 |     pub a12: BigInt,
   |     --------------- this field does not implement `Copy`
46 |     pub a21: BigInt,
   |     --------------- this field does not implement `Copy`
47 |     pub a22: BigInt,
   |     --------------- this field does not implement `Copy`

The problem is the Copy trait of BigInt not Matrix22

i see was using i32 for testing my prototype code

sorry for that

HAOYUatHZ commented 5 years ago

fixed. can cargo build & pass cargo test by using ur @amanusk https://github.com/KZen-networks/class-groups/pull/18

amanusk commented 5 years ago

Looks good to me!