diff --git a/src/zeroes.rs b/src/zeroes.rs index 8ace8dc..0117963 100644 --- a/src/zeroes.rs +++ b/src/zeroes.rs @@ -2,12 +2,6 @@ use arrayvec::ArrayVec; use crate::integer::Planar64; -fn one(z0:Planar64)->ArrayVec{ - let mut zeroes=ArrayVec::new(); - unsafe{zeroes.push_unchecked(z0)} - zeroes -} - #[inline] pub fn zeroes2(a0:Planar64,a1:Planar64,a2:Planar64)->ArrayVec{ if a2==Planar64::ZERO{ @@ -27,7 +21,7 @@ pub fn zeroes2(a0:Planar64,a1:Planar64,a2:Planar64)->ArrayVec{ (false,false)=>[(-a1+planar_radicand)/(a2*2),(a0*2)/(-a1+planar_radicand)].into(), } }else if radicand==0{ - return one(a1/(a2*-2)); + return ArrayVec::from_iter([a1/(a2*-2)]); }else{ return ArrayVec::new_const(); } @@ -39,7 +33,7 @@ pub fn zeroes1(a0:Planar64,a1:Planar64)->ArrayVec{ }else{ let q=((-a0.get() as i128)<<32)/(a1.get() as i128); if i64::MIN as i128<=q&&q<=i64::MAX as i128{ - return one(Planar64::raw(q as i64)); + return ArrayVec::from_iter([Planar64::raw(q as i64)]); }else{ return ArrayVec::new_const(); }