Fix flakey windows tests (#2332)

This commit is contained in:
Evan Almloff authored and GitHub committed 2024-04-17 15:08:38 -07:00
1 parent c9ab09b348
commit 5ce91e1bfc
31 files changed
+217 -136

No files matched your search

+1 -1
View File
@@ -145,7 +145,7 @@ pub fn remove_future(id: Task) {
///
/// pub fn use_custom_state() -> CustomState {
/// use_hook(|| CustomState {
/// inner: Signal::new(InnerCustomState)
/// inner: Signal::new(InnerCustomState(0))
/// })
/// }
/// ```
+1 -1
View File
@@ -310,7 +310,7 @@ impl Scope {
///
/// pub fn use_custom_state() -> CustomState {
/// use_hook(|| CustomState {
/// inner: Signal::new(InnerCustomState)
/// inner: Signal::new(InnerCustomState(0))
/// })
/// }
/// ```
+4 -6
View File
@@ -138,7 +138,7 @@ use tracing::instrument;
///
/// let dom = VirtualDom::new(app);
///
/// real_dom.apply(dom.rebuild());
/// dom.rebuild(real_dom.apply());
///
/// loop {
/// select! {
@@ -258,7 +258,7 @@ impl VirtualDom {
///
/// ```rust, ignore
/// let mut dom = VirtualDom::new_with_props(Example, SomeProps { name: "jane" });
/// let mutations = dom.rebuild();
/// dom.rebuild_in_place();
/// ```
pub fn new_with_props<P: Clone + 'static, M: 'static>(
root: impl ComponentFunction<P, M>,
@@ -302,7 +302,7 @@ impl VirtualDom {
///
/// ```rust, ignore
/// let mut dom = VirtualDom::new_from_root(VComponent::new(Example, SomeProps { name: "jane" }, "Example"));
/// let mutations = dom.rebuild();
/// dom.rebuild(to_writer);
/// ```
#[instrument(skip(root), level = "trace", name = "VirtualDom::new")]
pub(crate) fn new_with_component(root: impl AnyProps + 'static) -> Self {
@@ -611,9 +611,7 @@ impl VirtualDom {
/// static app: Component = |cx| rsx!{ "hello world" };
///
/// let mut dom = VirtualDom::new();
/// let edits = dom.rebuild();
///
/// apply_edits(edits);
/// dom.rebuild(to_writer);
/// ```
#[instrument(skip(self, to), level = "trace", name = "VirtualDom::rebuild")]
pub fn rebuild(&mut self, to: &mut impl WriteMutations) {