浏览代码

update docs example

Evan Almloff 2 年之前
父节点
当前提交
90b4dd806e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/guide/examples/hooks_composed.rs

+ 1 - 1
docs/guide/examples/hooks_composed.rs

@@ -7,7 +7,7 @@ fn main() {}
 struct AppSettings {}
 
 // ANCHOR: wrap_context
-fn use_settings(cx: &ScopeState) -> UseSharedState<AppSettings> {
+fn use_settings(cx: &ScopeState) -> &UseSharedState<AppSettings> {
     use_shared_state::<AppSettings>(cx).expect("App settings not provided")
 }
 // ANCHOR_END: wrap_context