remove more lifetimes

This commit is contained in:
Evan Almloff committed 2024-01-05 08:39:22 -06:00
1 parent 3ad16ddd37
commit f42ef3ef9d
18 files changed
+241 -421

No files matched your search

+1 -1
View File
@@ -142,7 +142,7 @@ fn create_components() {
#[derive(Props)]
struct ChildProps<'a> {
children: Element<'a>,
children: Element,
}
fn Child<'a>(cx: Scope<'a, ChildProps<'a>>) -> Element {
+2 -2
View File
@@ -19,7 +19,7 @@ fn nested_passthru_creates() {
}
#[component]
fn PassThru<'a>(cx: Scope<'a>, children: Element<'a>) -> Element {
fn PassThru<'a>(cx: Scope<'a>, children: Element) -> Element {
cx.render(rsx!(children))
}
@@ -59,7 +59,7 @@ fn nested_passthru_creates_add() {
}
#[component]
fn ChildComp<'a>(cx: Scope, children: Element<'a>) -> Element {
fn ChildComp<'a>(cx: Scope, children: Element) -> Element {
cx.render(rsx! { children })
}
+2 -2
View File
@@ -15,7 +15,7 @@ fn random_ns() -> Option<&'static str> {
}
}
fn create_random_attribute(attr_idx: &mut usize) -> TemplateAttribute<'static> {
fn create_random_attribute(attr_idx: &mut usize) -> TemplateAttribute {
match rand::random::<u8>() % 2 {
0 => TemplateAttribute::Static {
name: Box::leak(format!("attr{}", rand::random::<usize>()).into_boxed_str()),
@@ -238,7 +238,7 @@ struct BorrowedDepthProps<'a> {
inner: DepthProps,
}
fn create_random_element_borrowed<'a>(cx: Scope<'a, BorrowedDepthProps<'a>>) -> Element<'a> {
fn create_random_element_borrowed<'a>(cx: Scope<'a, BorrowedDepthProps<'a>>) -> Element {
println!("{}", cx.props.borrow);
let bump = cx.bump();
let allocated = bump.alloc(Scoped { scope: cx, props: &cx.props.inner });