mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
use RonLoader as LocalizationFragment's loader directly
This commit is contained in:
parent
bb7cc3d53b
commit
2b6b2fd12e
@ -160,7 +160,7 @@ impl assets::Asset for Localization {
|
||||
const EXTENSION: &'static str = "ron";
|
||||
}
|
||||
impl assets::Asset for LocalizationFragment {
|
||||
type Loader = LocalizationLoader;
|
||||
type Loader = assets::RonLoader;
|
||||
|
||||
const EXTENSION: &'static str = "ron";
|
||||
}
|
||||
@ -186,12 +186,6 @@ impl assets::Loader<Localization> for LocalizationLoader {
|
||||
Ok(asked_localization)
|
||||
}
|
||||
}
|
||||
impl assets::Loader<LocalizationFragment> for LocalizationLoader {
|
||||
fn load(content: Cow<[u8]>, ext: &str) -> Result<LocalizationFragment, assets::BoxedError> {
|
||||
let asked_fragment: LocalizationFragment = assets::RonLoader::load(content, ext)?;
|
||||
Ok(asked_fragment)
|
||||
}
|
||||
}
|
||||
|
||||
/// Initializes and return a Localization with the given key
|
||||
pub fn init_localization(asset_key: &str) -> Result<Localization, assets::BoxedError> {
|
||||
|
Loading…
Reference in New Issue
Block a user