Skip to content

Commit

Permalink
CLEANUP
Browse files Browse the repository at this point in the history
  • Loading branch information
cecton committed Sep 30, 2023
1 parent 5282d96 commit 95d1438
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
17 changes: 7 additions & 10 deletions packages/yew/src/dom_bundle/bnode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,13 @@ impl Reconcilable for VNode {
slot,
bundle,
),
VNode::VSuspense(vsuspsense) => {
// TODO: replace this by Rc::unwrap_or_clone() when it becomes stable
RcExt::unwrap_or_clone(vsuspsense).reconcile_node(
root,
parent_scope,
parent,
slot,
bundle,
)
}
VNode::VSuspense(vsuspsense) => RcExt::unwrap_or_clone(vsuspsense).reconcile_node(
root,
parent_scope,
parent,
slot,
bundle,
),
VNode::VRaw(vraw) => vraw.reconcile_node(root, parent_scope, parent, slot, bundle),
}
}
Expand Down
1 change: 0 additions & 1 deletion packages/yew/src/html/classes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ impl IntoIterator for Classes {

#[inline]
fn into_iter(self) -> Self::IntoIter {
// NOTE: replace this by Rc::unwrap_or_clone() when it becomes stable
RcExt::unwrap_or_clone(self.set).into_iter()
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/yew/src/virtual_dom/vsuspense.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use crate::html::ImplicitClone;
#[derive(Clone, Debug, PartialEq)]
pub struct VSuspense {
/// Child nodes.
pub(crate) children: Box<VNode>,
pub(crate) children: VNode,
/// Fallback nodes when suspended.
pub(crate) fallback: Box<VNode>,
pub(crate) fallback: VNode,
/// Whether the current status is suspended.
pub(crate) suspended: bool,
/// The Key.
Expand All @@ -19,8 +19,8 @@ impl ImplicitClone for VSuspense {}
impl VSuspense {
pub fn new(children: VNode, fallback: VNode, suspended: bool, key: Option<Key>) -> Self {
Self {
children: children.into(),
fallback: fallback.into(),
children,
fallback,
suspended,
key,
}
Expand Down

0 comments on commit 95d1438

Please sign in to comment.