diff --git a/src/zeroes.rs b/src/zeroes.rs index f681a2d..3866ec3 100644 --- a/src/zeroes.rs +++ b/src/zeroes.rs @@ -2,31 +2,31 @@ use crate::integer::Planar64; #[inline] -pub fn zeroes2(a0:Planar64,a1:Planar64,a2:Planar64) -> Vec{ +pub fn zeroes2<'a>(a0:Planar64,a1:Planar64,a2:Planar64)->&'a [Planar64]{ if a2==Planar64::ZERO{ - return zeroes1(a0, a1); + 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 Vec { +pub fn zeroes1<'a>(a0:Planar64,a1:Planar64)->&'a [Planar64]{ if a1==Planar64::ZERO{ - return vec![]; - } else { - return vec![-a0/a1]; + &[] + }else{ + &[-a0/a1] } } \ No newline at end of file