|
|
@ -15,7 +15,7 @@ where I: Iterator,
|
|
|
|
type Item = u16;
|
|
|
|
type Item = u16;
|
|
|
|
fn next(&mut self) -> Option<Self::Item>
|
|
|
|
fn next(&mut self) -> Option<Self::Item>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let mut c = 0u16;
|
|
|
|
/*let mut c = 0u16;
|
|
|
|
unsafe {
|
|
|
|
unsafe {
|
|
|
|
if let Some(a) = self.iter.next() {
|
|
|
|
if let Some(a) = self.iter.next() {
|
|
|
|
crate::reinterpret::bytes_mut(&mut c)[0] = *a.borrow();
|
|
|
|
crate::reinterpret::bytes_mut(&mut c)[0] = *a.borrow();
|
|
|
@ -25,8 +25,19 @@ where I: Iterator,
|
|
|
|
if let Some(b) = self.iter.next() {
|
|
|
|
if let Some(b) = self.iter.next() {
|
|
|
|
crate::reinterpret::bytes_mut(&mut c)[1] = *b.borrow();
|
|
|
|
crate::reinterpret::bytes_mut(&mut c)[1] = *b.borrow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
let mut ar = [0u8; std::mem::size_of::<u16>()];
|
|
|
|
|
|
|
|
if let Some(a) = self.iter.next()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ar[0] = *a.borrow();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return None;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if let Some(b) = self.iter.next()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
ar[1] = *b.borrow();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Some(c)
|
|
|
|
Some(u16::from_le_bytes(ar))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|