chore: make clippy happy
This commit is contained in:
1 parent
34d9aafe0e
commit
5a0ae67ccb
7 files changed
+29
-21
No files matched your search
@@ -70,7 +70,7 @@ impl StringCache {
|
||||
}
|
||||
}
|
||||
}
|
||||
if children.len() == 0 && tag_is_self_closing(tag) {
|
||||
if children.is_empty() && tag_is_self_closing(tag) {
|
||||
write!(chain, "/>")?;
|
||||
} else {
|
||||
write!(chain, ">")?;
|
||||
@@ -92,9 +92,21 @@ impl StringCache {
|
||||
}
|
||||
|
||||
fn tag_is_self_closing(tag: &str) -> bool {
|
||||
match tag {
|
||||
"area" | "base" | "br" | "col" | "embed" | "hr" | "img" | "input" | "link" | "meta"
|
||||
| "param" | "source" | "track" | "wbr" => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(
|
||||
tag,
|
||||
"area"
|
||||
| "base"
|
||||
| "br"
|
||||
| "col"
|
||||
| "embed"
|
||||
| "hr"
|
||||
| "img"
|
||||
| "input"
|
||||
| "link"
|
||||
| "meta"
|
||||
| "param"
|
||||
| "source"
|
||||
| "track"
|
||||
| "wbr"
|
||||
)
|
||||
}
|
||||
@@ -12,7 +12,7 @@ use crate::renderer::Renderer;
|
||||
/// A convenience function to render an `rsx!` call to a string
|
||||
///
|
||||
/// For advanced rendering, create a new `SsrRender`.
|
||||
pub fn render_lazy<'a, 'b>(f: LazyNodes<'a, 'b>) -> String {
|
||||
pub fn render_lazy(f: LazyNodes<'_, '_>) -> String {
|
||||
// We need to somehow get the lazy call into the virtualdom even with the lifetime
|
||||
// Since the lazy lifetime is valid for this function, we can just transmute it to static temporarily
|
||||
// This is okay since we're returning an owned value
|
||||
|
||||
Reference in new issue
Block a user