From 60c8ce6b9b2f1abd107545027bf65075234a5538 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 5 Nov 2026 12:18:22 +0100 Subject: refactor(engine): use either crate instead of engine_ecs::util::Either --- engine/src/file_format/wavefront/obj.rs | 6 +++--- engine/src/ui/view/world.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engine/src') diff --git a/engine/src/file_format/wavefront/obj.rs b/engine/src/file_format/wavefront/obj.rs index d1a1bf3..7210465 100644 --- a/engine/src/file_format/wavefront/obj.rs +++ b/engine/src/file_format/wavefront/obj.rs @@ -6,7 +6,7 @@ use std::collections::HashMap; use std::fs::read_to_string; use std::path::PathBuf; -use engine_ecs::util::Either; +use either::Either; use crate::file_format::wavefront::common::{ keyword, @@ -234,8 +234,8 @@ impl Obj )?)?) }) .flat_map(|res| match res { - Ok(inner) => Either::A(inner.into_iter().map(Ok)), - Err(err) => Either::B(vec![Err(err)].into_iter()), + Ok(inner) => Either::Left(inner.into_iter().map(Ok)), + Err(err) => Either::Right(vec![Err(err)].into_iter()), }) .collect::, _>>() } diff --git a/engine/src/ui/view/world.rs b/engine/src/ui/view/world.rs index bf92859..5667963 100644 --- a/engine/src/ui/view/world.rs +++ b/engine/src/ui/view/world.rs @@ -8,6 +8,7 @@ use ecs::phase::Phase; use ecs::query::term::{With, Without}; use ecs::sole::Is as IsSole; use ecs::system::Function as SystemFunction; +use either::Either; use crate::color::{Rgb, Rgba}; use crate::ecs::actions::Actions; @@ -16,7 +17,6 @@ use crate::ecs::component::{Info as ComponentInfo, Parts as ComponentParts}; use crate::ecs::entity::{Handle as EntityHandle, Name as EntityName}; use crate::ecs::sole::Single; use crate::ecs::uid::Uid; -use crate::ecs::util::Either; use crate::ecs::{Component, Query, World}; use crate::image::{Format as ImageFormat, Image}; use crate::reflection::{ @@ -1819,8 +1819,8 @@ fn create_enum_widgets( let disabled = variant.fields.as_ref().and_then(|fields| { fields.fields().iter().find_map(|field| { let field_name = match field.name { - Some(field_name) => Either::A(field_name), - None => Either::B(field.index), + Some(field_name) => Either::Left(field_name), + None => Either::Right(field.index), }; let Some(field_type) = field.type_reflection() else { -- cgit v1.2.3-18-g5258