fix: improve diagnostics for untracked reads on `create_slice`

This commit is contained in:
Greg Johnston 2023-07-03 16:04:02 -04:00
parent 66f54e7f1a
commit 6b3e9cf85f
1 changed files with 3 additions and 0 deletions

View File

@ -68,6 +68,7 @@ use crate::{
/// // setting name only causes name to log, not count
/// set_name.set("Bob".into());
/// ```
#[track_caller]
pub fn create_slice<T, O, S>(
cx: Scope,
signal: RwSignal<T>,
@ -85,6 +86,7 @@ where
/// Takes a memoized, read-only slice of a signal. This is equivalent to the
/// read-only half of [`create_slice`].
#[track_caller]
pub fn create_read_slice<T, O>(
cx: Scope,
signal: RwSignal<T>,
@ -98,6 +100,7 @@ where
/// Creates a setter to access one slice of a signal. This is equivalent to the
/// write-only half of [`create_slice`].
#[track_caller]
pub fn create_write_slice<T, O>(
cx: Scope,
signal: RwSignal<T>,