Skip to content

Commit

Permalink
Fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
zakstucke committed Nov 23, 2024
1 parent d6405da commit 91f567b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reactive_graph/src/owner/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ pub fn take_context<T: 'static>() -> Option<T> {
/// provide_context(String::from("foo"));
///
/// Effect::new(move |_| {
/// let value = with_context::<String>(|val| val.to_string())
/// let value = with_context::<String, _>(|val| val.to_string())
/// .expect("could not find String in context");
/// assert_eq!(value, "foo");
/// });
Expand Down Expand Up @@ -422,7 +422,7 @@ pub fn with_context<T: 'static, R>(cb: impl FnOnce(&T) -> R) -> Option<R> {
/// provide_context(String::from("foo"));
///
/// Effect::new(move |_| {
/// let value = update_context::<String>(|val| {
/// let value = update_context::<String, _>(|val| {
/// std::mem::replace(val, "bar".to_string())
/// })
/// .expect("could not find String in context");
Expand Down

0 comments on commit 91f567b

Please sign in to comment.