sorta working simplified focus!

This commit is contained in:
🪞👃🪞 2024-08-31 21:50:13 +03:00
parent 777904cb35
commit 9f358f8a21
5 changed files with 47 additions and 121 deletions

View file

@ -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))
}
}