From ed5b5adc3d6770861cc16e7ad0cf31f68e09dfab Mon Sep 17 00:00:00 2001 From: arctic-hen7 Date: Sat, 18 Feb 2023 12:16:55 +1100 Subject: [PATCH] fix: fixed two broken tests --- packages/perseus-cli/tests/export_error_page.rs | 2 +- packages/perseus/src/state/rx_collections/mod.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/perseus-cli/tests/export_error_page.rs b/packages/perseus-cli/tests/export_error_page.rs index c336cc5495..866bfe34f5 100644 --- a/packages/perseus-cli/tests/export_error_page.rs +++ b/packages/perseus-cli/tests/export_error_page.rs @@ -35,7 +35,7 @@ fn export_error_page_produces_page() -> Result<(), Box> { dir.child("404.html") // Going off the default development error pages - .assert(predicate::str::contains("Page not found.")); + .assert(predicate::str::contains("Page not found!")); Ok(()) } diff --git a/packages/perseus/src/state/rx_collections/mod.rs b/packages/perseus/src/state/rx_collections/mod.rs index 9657a5a992..14031f2afd 100644 --- a/packages/perseus/src/state/rx_collections/mod.rs +++ b/packages/perseus/src/state/rx_collections/mod.rs @@ -85,7 +85,7 @@ //! //! **Also note:** when iterating over any of these collections to create //! `View` fragments, you will need to use `create_ref()` to prevent lifetime -//! errors in some more complex cases, like so: +//! errors, like so: //! //! ```no_run //! # use serde::{Serialize, Deserialize}; @@ -102,13 +102,13 @@ //! # #[auto_scope] //! # fn view(cx: Scope, state: &StateRx) -> View { //! // Note the use of `create_ref()` here -//! let list = create_ref(state.list.get()); +//! let list = create_ref(cx, state.list.get()); //! let view = View::new_fragment( //! list.iter() //! .map(|elem| { //! // ... -//! # view! { -//! (elem) +//! # view! { cx, +//! (elem.get()) //! } //! }) //! .collect()