Skip to content

Commit a3debc9

Browse files
committed
fix: feature soundness
1 parent 59c3148 commit a3debc9

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

packages/yew/src/lazy.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ pub trait LazyComponent: 'static {
7474

7575
enum LazyState<C: BaseComponent> {
7676
Pending(Suspension),
77+
#[allow(unused)] // Only constructed with feature csr or ssr
7778
Created(LazyVTable<C>),
7879
}
7980

@@ -124,6 +125,7 @@ impl<C: LazyComponent> BaseComponent for Lazy<C> {
124125
// force a re-render with this new state (without a message exchange)
125126
host_scope.schedule_render();
126127
}
128+
let _ = (host_scope, state, vtable);
127129
});
128130
RefCell::new(LazyState::Pending(suspension))
129131
});

packages/yew/src/virtual_dom/vcomp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ use super::Key;
1414
use crate::dom_bundle::Fragment;
1515
#[cfg(feature = "csr")]
1616
use crate::dom_bundle::{BSubtree, DomSlot, DynamicDomSlot};
17-
use crate::html::BaseComponent;
17+
#[cfg(any(feature = "ssr", feature = "csr"))]
18+
use crate::html::AnyScope;
1819
#[cfg(feature = "csr")]
1920
use crate::html::Scoped;
20-
#[cfg(any(feature = "ssr", feature = "csr"))]
21-
use crate::html::{AnyScope, Scope};
21+
use crate::html::{BaseComponent, Scope};
2222
use crate::scheduler::Shared;
2323
#[cfg(feature = "ssr")]
2424
use crate::{feat_ssr::VTagKind, platform::fmt::BufWriter};

0 commit comments

Comments
 (0)