Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added #[track_caller] to to_any_source #2963

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

Baptistemontan
Copy link
Contributor

Currently when unwrap_signal! is called inside ToAnySource::to_any_source the message is:

thread 'tokio-runtime-worker' panicked at C:\Users\bapti\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reactive_graph-0.1.0-beta5\src\signal\subscriber_traits.rs:108:29:
At C:\Users\bapti\.cargo\registry\src\index.crates.io-6f17d22bba15001f\reactive_graph-0.1.0-beta5\src\signal\subscriber_traits.rs:108:29, you tried to access a reactive value which was defined at C:\Users\bapti\Documents\Code\Rust\hex-chess\leptos_i18n\leptos_i18n\src\context.rs:121:25, but it has already been disposed.

the "At {location}, you tried ..." location is not very helpfull, adding #[track_caller] to the function provide a better hint to where the bug is.

@Baptistemontan Baptistemontan changed the title Added #[track_caller] to to_any_source Added #[track_caller] to to_any_source Sep 11, 2024
@gbj
Copy link
Collaborator

gbj commented Sep 12, 2024

Thanks!

@gbj gbj merged commit 43f2ad7 into leptos-rs:main Sep 12, 2024
69 checks passed
chrisp60 pushed a commit to chrisp60/leptos that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants