File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -641,11 +641,9 @@ impl Mpq {
641
641
642
642
impl Clone for Mpq {
643
643
fn clone(&self) -> Mpq {
644
- unsafe {
645
- let mut res = Mpq::new();
646
- res.set(self);
647
- res
648
- }
644
+ let mut res = Mpq::new();
645
+ res.set(self);
646
+ res
649
647
}
650
648
}
651
649
@@ -733,15 +731,15 @@ impl IntConvertible for Mpq {
733
731
}
734
732
fn from_int(other: int) -> Mpq {
735
733
let mut res = Mpq::new();
736
- unsafe { res.set_z(&from_int(other)); } // purity workaround
734
+ res.set_z(&from_int(other));
737
735
res
738
736
}
739
737
}
740
738
741
739
impl One for Mpq {
742
740
fn one() -> Mpq {
743
741
let mut res = Mpq::new();
744
- unsafe { __gmpq_set_ui(&mut res.mpq, 1, 1) } // purity
742
+ unsafe { __gmpq_set_ui(&mut res.mpq, 1, 1) }
745
743
res
746
744
}
747
745
}
You can’t perform that action at this time.
0 commit comments