mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-12 14:46:41 +01:00
fix: collect enum, break: Render for Option<&T>
This commit is contained in:
parent
72f47bc837
commit
33bdf65e8d
8 changed files with 37 additions and 33 deletions
|
|
@ -25,12 +25,12 @@ impl<'a> Collection<'a> {
|
|||
}
|
||||
|
||||
pub trait Collect<'a> {
|
||||
fn add_box (self, item: Box<dyn Render>) -> Self;
|
||||
fn add_box (self, item: Box<dyn Render + 'a>) -> Self;
|
||||
fn add_ref (self, item: &'a dyn Render) -> Self;
|
||||
}
|
||||
|
||||
impl<'a> Collect<'a> for Collection<'a> {
|
||||
fn add_box (mut self, item: Box<dyn Render>) -> Self {
|
||||
fn add_box (mut self, item: Box<dyn Render + 'a>) -> Self {
|
||||
self.0.push(Collected::Box(item));
|
||||
self
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue