added rebuild and Arc insted of Box

This commit is contained in:
2024-11-12 15:59:27 +01:00
parent 994b7d2580
commit e1da609eb1
8 changed files with 154 additions and 78 deletions
+6 -2
View File
@@ -7,6 +7,10 @@ pub use styles::*;
pub mod elements;
pub use elements::*;
pub fn text<'a>() -> Box<Text<'a>> {
Box::new(Text::new())
pub fn text<'a>() -> std::sync::Arc<Text<'a>> {
std::sync::Arc::new(Text::new())
}
pub fn div<'a>() -> std::sync::Arc<Div<'a>> {
std::sync::Arc::new(Div::new())
}