(Some of?) these debug assertions seem to break the release build

This commit is contained in:
Greg Johnston 2022-11-28 21:37:47 -05:00
parent a638c3d39a
commit 54b7b780c8
3 changed files with 10 additions and 10 deletions

View file

@ -90,15 +90,15 @@ impl ComponentRepr {
// Insert the comments into the document fragment
// so they can serve as our references when inserting
// future nodes
#[cfg(debug_assertions)]
//#[cfg(debug_assertions)]
fragment
.append_with_node_2(&opening.node, &closing.node)
.expect("append to not err");
#[cfg(not(debug_assertions))]
/* #[cfg(not(debug_assertions))]
fragment
.append_with_node_1(&closing.node)
.expect("append to not err");
.expect("append to not err"); */
fragment
};

View file

@ -59,15 +59,15 @@ impl Default for EachRepr {
// Insert the comments into the document fragment
// so they can serve as our references when inserting
// future nodes
#[cfg(debug_assertions)]
//#[cfg(debug_assertions)]
fragment
.append_with_node_2(&opening.node, &closing.node)
.expect("append to not err");
#[cfg(not(debug_assertions))]
/* #[cfg(not(debug_assertions))]
fragment
.append_with_node_1(&closing.node)
.expect("append to not err");
.expect("append to not err"); */
fragment
};
@ -118,7 +118,7 @@ impl Default for EachItem {
// Insert the comments into the document fragment
// so they can serve as our references when inserting
// future nodes
#[cfg(debug_assertions)]
//#[cfg(debug_assertions)]
fragment
.append_with_node_2(&opening.node, &closing.node)
.expect("append to not err");

View file

@ -123,17 +123,17 @@ impl Comment {
fn new(content: impl Into<Cow<'static, str>>) -> Self {
let content = content.into();
#[cfg(all(debug_assertions, target_arch = "wasm32", feature = "web"))]
//#[cfg(all(debug_assertions, target_arch = "wasm32", feature = "web"))]
let node = crate::document()
.create_comment(&format!(" {content} "))
.unchecked_into::<web_sys::Node>()
.into();
#[cfg(all(not(debug_assertions), target_arch = "wasm32", feature = "web"))]
/* #[cfg(all(not(debug_assertions), target_arch = "wasm32", feature = "web"))]
let node = crate::document()
.create_comment(&format!(""))
.unchecked_into::<web_sys::Node>()
.into();
.into(); */
Self {
#[cfg(all(target_arch = "wasm32", feature = "web"))]