Skip to content

Commit d0f1b3e

Browse files
Add a few missing doc comments in bevy_image (#19493)
# Objective Another tiny step towards #3492. --------- Co-authored-by: Alice Cecile <[email protected]>
1 parent 476d79d commit d0f1b3e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

crates/bevy_image/src/dynamic_texture_atlas_builder.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ use guillotiere::{size2, Allocation, AtlasAllocator};
55
use thiserror::Error;
66
use tracing::error;
77

8+
/// An error produced by [`DynamicTextureAtlasBuilder`] when trying to add a new
9+
/// texture to a [`TextureAtlasLayout`].
810
#[derive(Debug, Error)]
911
pub enum DynamicTextureAtlasBuilderError {
12+
/// Unable to allocate space within the atlas for the new texture
1013
#[error("Couldn't allocate space to add the image requested")]
1114
FailedToAllocateSpace,
1215
/// Attempted to add a texture to an uninitialized atlas

crates/bevy_image/src/image.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ use wgpu_types::{
2222
TextureViewDescriptor,
2323
};
2424

25+
/// Trait used to provide default values for Bevy-external types that
26+
/// do not implement [`Default`].
2527
pub trait BevyDefault {
28+
/// Returns the default value for a type.
2629
fn bevy_default() -> Self;
2730
}
2831

0 commit comments

Comments
 (0)