mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-12 14:46:41 +01:00
sorta working simplified focus!
This commit is contained in:
parent
777904cb35
commit
9f358f8a21
5 changed files with 47 additions and 121 deletions
|
|
@ -27,7 +27,9 @@ impl<'a> Collection<'a> {
|
|||
pub trait Collect<'a> {
|
||||
fn add_box (self, item: Box<dyn Render + 'a>) -> Self;
|
||||
fn add_ref (self, item: &'a dyn Render) -> Self;
|
||||
fn add <T: Render + Sized + 'a> (self, item: T) -> Self where Self: Sized {
|
||||
fn add <T: Render + Sized + 'a> (self, item: T) -> Self
|
||||
where Self: Sized
|
||||
{
|
||||
self.add_box(Box::new(item))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue