diff --git a/src/zeroes.rs b/src/zeroes.rs index 67c5c75..30a59b9 100644 --- a/src/zeroes.rs +++ b/src/zeroes.rs @@ -2,31 +2,31 @@ use crate::integer::Planar64; #[inline] -pub fn zeroes2<'a>(a0:Planar64,a1:Planar64,a2:Planar64)->&'a [Planar64]{ - if a2==Planar64::ZERO{ - return zeroes1(a0,a1); - } +pub fn zeroes2(a0:Planar64,a1:Planar64,a2:Planar64)->impl std::iter::IntoIterator{ + // if a2==Planar64::ZERO{ + // return zeroes1(a0,a1); + // } let radicand=a1.get() as i128*a1.get() as i128-a2.get() as i128*a0.get() as i128*4; if 0(a0:Planar64,a1:Planar64)->&'a [Planar64]{ +pub fn zeroes1(a0:Planar64,a1:Planar64)->impl std::iter::IntoIterator{ if a1==Planar64::ZERO{ - &[] + return [Planar64::ZERO].into_iter(); }else{ - [-a0/a1].as_slice() + return [-a0/a1].into_iter(); } } \ No newline at end of file