refactor: trait away panel item backends

This commit is contained in:
Nova
2023-07-23 19:59:35 -04:00
parent eedf5446e8
commit 1047f5242b
10 changed files with 1037 additions and 950 deletions

View File

@@ -1,4 +1,4 @@
use super::{Item, ItemSpecialization, ItemType};
use super::{Item, ItemType};
use crate::{
core::{
client::{Client, INTERNAL_CLIENT},
@@ -52,10 +52,9 @@ impl EnvironmentItem {
};
Ok(flexbuffers::singleton(environment_item.path.as_str()))
}
}
impl ItemSpecialization for EnvironmentItem {
fn serialize_start_data(&self, id: &str) -> Option<Vec<u8>> {
serialize((id, self.path.as_str())).ok()
pub fn serialize_start_data(&self, id: &str) -> Result<Vec<u8>> {
serialize((id, self.path.as_str())).map_err(|e| e.into())
}
}