diff --git a/crates/bevy_image/src/dynamic_texture_atlas_builder.rs b/crates/bevy_image/src/dynamic_texture_atlas_builder.rs index e8b812194a..3e1c8fd542 100644 --- a/crates/bevy_image/src/dynamic_texture_atlas_builder.rs +++ b/crates/bevy_image/src/dynamic_texture_atlas_builder.rs @@ -5,8 +5,11 @@ use guillotiere::{size2, Allocation, AtlasAllocator}; use thiserror::Error; use tracing::error; +/// An error produced by [`DynamicTextureAtlasBuilder`] when trying to add a new +/// texture to a [`TextureAtlasLayout`]. #[derive(Debug, Error)] pub enum DynamicTextureAtlasBuilderError { + /// Unable to allocate space within the atlas for the new texture #[error("Couldn't allocate space to add the image requested")] FailedToAllocateSpace, /// Attempted to add a texture to an uninitialized atlas diff --git a/crates/bevy_image/src/image.rs b/crates/bevy_image/src/image.rs index 8dbe693286..e7548bb2bd 100644 --- a/crates/bevy_image/src/image.rs +++ b/crates/bevy_image/src/image.rs @@ -22,7 +22,10 @@ use wgpu_types::{ TextureViewDescriptor, }; +/// Trait used to provide default values for Bevy-external types that +/// do not implement [`Default`]. pub trait BevyDefault { + /// Returns the default value for a type. fn bevy_default() -> Self; }