Derive Clone for ImageLoaderSettings
and ImageFormatSetting
(#18335)
# Objective I was setting up an asset loader that passes settings through to `ImageLoader`, and i have to clone the settings to achieve this. ## Solution Derive `Clone` for `ImageLoaderSettings` and `ImageFormatSetting`. ## Testing Full CI passed.
This commit is contained in:
parent
70514229da
commit
18f543474d
@ -81,7 +81,7 @@ impl ImageLoader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Default, Debug)]
|
#[derive(Serialize, Deserialize, Default, Debug, Clone)]
|
||||||
pub enum ImageFormatSetting {
|
pub enum ImageFormatSetting {
|
||||||
#[default]
|
#[default]
|
||||||
FromExtension,
|
FromExtension,
|
||||||
@ -89,7 +89,7 @@ pub enum ImageFormatSetting {
|
|||||||
Guess,
|
Guess,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize, Deserialize, Debug)]
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||||
pub struct ImageLoaderSettings {
|
pub struct ImageLoaderSettings {
|
||||||
pub format: ImageFormatSetting,
|
pub format: ImageFormatSetting,
|
||||||
pub is_srgb: bool,
|
pub is_srgb: bool,
|
||||||
|
Loading…
Reference in New Issue
Block a user