1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-03 18:54:05 +02:00

clippy fixes

This commit is contained in:
Robin Appelman 2022-02-27 19:18:57 +01:00
commit ea557f08d3
4 changed files with 6 additions and 6 deletions

View file

@ -138,10 +138,10 @@ where
[T; N]: Default,
{
fn parse(raw: &'_ str) -> Result<Self, EntityParseError> {
let mut values = raw.split(" ").map(T::from_str);
let mut values = raw.split(' ').map(T::from_str);
let mut result = <[T; N]>::default();
for i in 0..N {
result[i] = values.next().ok_or(EntityParseError::ElementCount)??;
for item in result.iter_mut() {
*item = values.next().ok_or(EntityParseError::ElementCount)??;
}
Ok(result)
}

View file

@ -96,7 +96,7 @@ impl FromStr for Vector {
type Err = EntityParseError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
let mut floats = s.split(" ").map(f32::from_str);
let mut floats = s.split(' ').map(f32::from_str);
let x = floats.next().ok_or(EntityParseError::ElementCount)??;
let y = floats.next().ok_or(EntityParseError::ElementCount)??;
let z = floats.next().ok_or(EntityParseError::ElementCount)??;