mirror of
https://github.com/saymrwulf/pasta_curves-source.git
synced 2026-09-06 20:20:34 +00:00
fix: less allocations
Co-authored-by: str4d <thestr4d@gmail.com>
This commit is contained in:
parent
870939ab03
commit
cc51340dc5
1 changed files with 1 additions and 1 deletions
|
|
@ -11,6 +11,6 @@ pub use fq::*;
|
||||||
fn u64_to_u32(limbs: &[u64]) -> alloc::vec::Vec<u32> {
|
fn u64_to_u32(limbs: &[u64]) -> alloc::vec::Vec<u32> {
|
||||||
limbs
|
limbs
|
||||||
.iter()
|
.iter()
|
||||||
.flat_map(|limb| alloc::vec![(limb & 0xFFFF_FFFF) as u32, (limb >> 32) as u32])
|
.flat_map(|limb| Some((limb & 0xFFFF_FFFF) as u32).into_iter().chain(Some((limb >> 32) as u32)))
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue