Don't eat keys (#2280)

This commit is contained in:
Jonathan Kelley authored and GitHub committed 2024-04-08 22:31:58 -07:00
1 parent 67af2d89dd
commit 994056e16d
3 files changed
+41 -6

No files matched your search

+8 -1
View File
@@ -1,4 +1,4 @@
use dioxus_rsx::{AttributeType, BodyNode, ElementAttrValue, ForLoop, IfChain};
use dioxus_rsx::{AttributeType, BodyNode, ElementAttrValue, ForLoop, IfChain, IfmtInput};
use proc_macro2::{LineColumn, Span};
use quote::ToTokens;
use std::{
@@ -329,6 +329,13 @@ impl<'a> Writer<'a> {
Ok(())
}
pub(crate) fn key_len(&self, key: Option<&IfmtInput>) -> usize {
match key {
Some(key) => ifmt_to_string(key).len() + 5,
None => 0,
}
}
}
pub(crate) trait SpanLength {