rust 2024
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#[derive(rust_embed::Embed)]
|
||||
#[folder = "src/gui/assets/"]
|
||||
#[folder = "src/assets/"]
|
||||
pub struct GuiAsset;
|
||||
|
||||
impl wgui::assets::AssetProvider for GuiAsset {
|
||||
fn load_from_path(&mut self, path: &str) -> anyhow::Result<Vec<u8>> {
|
||||
match GuiAsset::get(path) {
|
||||
match Self::get(path) {
|
||||
Some(data) => Ok(data.data.to_vec()),
|
||||
None => anyhow::bail!("embedded file {} not found", path),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user