Fix formatting

This commit is contained in:
Piotr Siuszko 2025-01-14 12:49:38 +01:00
parent 0bd267570c
commit 17d42d4c27
1 changed files with 2 additions and 8 deletions

View File

@ -49,10 +49,7 @@ pub trait RpackAssetHelper {
/// Creates a [`Sprite`] component for the given atlas key, if available in any of the loaded Atlases. /// Creates a [`Sprite`] component for the given atlas key, if available in any of the loaded Atlases.
fn try_make_sprite<T: AsRef<str>>(&self, key: T) -> Result<Sprite, RpackAtlasError>; fn try_make_sprite<T: AsRef<str>>(&self, key: T) -> Result<Sprite, RpackAtlasError>;
/// Creates a [`ImageNode`] component for the given atlas key, if available in any of the loaded Atlases. /// Creates a [`ImageNode`] component for the given atlas key, if available in any of the loaded Atlases.
fn try_make_image_node<T: AsRef<str>>( fn try_make_image_node<T: AsRef<str>>(&self, key: T) -> Result<ImageNode, RpackAtlasError>;
&self,
key: T,
) -> Result<ImageNode, RpackAtlasError>;
/// Provides list of all loaded atlas data keys /// Provides list of all loaded atlas data keys
fn atlas_data_keys(&self) -> Vec<&str>; fn atlas_data_keys(&self) -> Vec<&str>;
@ -91,10 +88,7 @@ impl RpackAssetHelper for Assets<RpackAtlasAsset> {
Err(RpackAtlasError::WrongKey) Err(RpackAtlasError::WrongKey)
} }
fn try_make_image_node<T: AsRef<str>>( fn try_make_image_node<T: AsRef<str>>(&self, key: T) -> Result<ImageNode, RpackAtlasError> {
&self,
key: T,
) -> Result<ImageNode, RpackAtlasError> {
if self.is_empty() { if self.is_empty() {
return Err(RpackAtlasError::NoAtlas); return Err(RpackAtlasError::NoAtlas);
} }