diff options
Diffstat (limited to 'src/encyclopedia.rs')
| -rw-r--r-- | src/encyclopedia.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/encyclopedia.rs b/src/encyclopedia.rs index 17e9857..19d4297 100644 --- a/src/encyclopedia.rs +++ b/src/encyclopedia.rs @@ -5,7 +5,7 @@ use crate::assemblage::Assemblage; use crate::componentwrapper::ComponentWrapper; use crate::template::Template; -#[derive(Default)] +#[derive(Default, Clone)] pub struct Encyclopedia { items: HashMap<String, Assemblage> } @@ -32,7 +32,7 @@ impl Encyclopedia { Ok(()) } - pub fn construct(&self, template: &Template) -> Result<Vec<ComponentWrapper>, &str> { + pub fn construct(&self, template: &Template) -> Result<Vec<ComponentWrapper>, &'static str> { let assemblage = self.items.get(&template.name).ok_or("unknown assemblage name")?; assemblage.instantiate(&template.args, &template.kwargs) } |
