From f1f6fd349a95059b031171021ff17251fde78456 Mon Sep 17 00:00:00 2001 From: Michael Dorst Date: Fri, 21 Jan 2022 00:12:32 +0000 Subject: [PATCH] Remove `ComponentsError` (#3716) # Objective `ComponentsError` is unused and should be removed. Fixes #3707 ## Solution Remove `ComponentsError`. --- crates/bevy_ecs/src/component.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs index 69b3254dea..ff970e69ab 100644 --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -9,7 +9,6 @@ use std::{ alloc::Layout, any::{Any, TypeId}, }; -use thiserror::Error; /// A component is data associated with an [`Entity`](crate::entity::Entity). Each entity can have /// multiple different types of components, but only one of them per type. @@ -244,16 +243,6 @@ pub struct Components { resource_indices: std::collections::HashMap, } -#[derive(Debug, Error)] -pub enum ComponentsError { - #[error("A component of type {name:?} ({type_id:?}) already exists")] - ComponentAlreadyExists { - type_id: TypeId, - name: String, - existing_id: ComponentId, - }, -} - impl Components { #[inline] pub fn init_component(&mut self, storages: &mut Storages) -> ComponentId {