From 2b6b2fd12e214c850f818f572d8d52d08dcfea2f Mon Sep 17 00:00:00 2001 From: Vincent Foulon Date: Mon, 28 Dec 2020 23:53:26 +0100 Subject: [PATCH] use RonLoader as LocalizationFragment's loader directly --- voxygen/src/i18n.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/voxygen/src/i18n.rs b/voxygen/src/i18n.rs index 92c1f169b5..b1e3e318b1 100644 --- a/voxygen/src/i18n.rs +++ b/voxygen/src/i18n.rs @@ -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 for LocalizationLoader { Ok(asked_localization) } } -impl assets::Loader for LocalizationLoader { - fn load(content: Cow<[u8]>, ext: &str) -> Result { - 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 {