1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-03 10:44:07 +02:00

cleaner vector iter

This commit is contained in:
Robin Appelman 2022-02-18 19:38:55 +01:00
commit 02d22a42f7
2 changed files with 2 additions and 3 deletions

View file

@ -7,7 +7,6 @@ use bitflags::bitflags;
use bv::BitVec;
use parse_display::Display;
use std::fmt;
use std::iter::once;
use std::mem::size_of;
use std::ops::{Add, Index};
@ -210,7 +209,7 @@ pub struct Vector {
impl Vector {
pub fn iter(&self) -> impl Iterator<Item = f32> {
once(self.x).chain(once(self.y)).chain(once(self.z))
[self.x, self.y, self.z].into_iter()
}
}