From 5b3f3e742b0bab6af57e409a450d32500cc09751 Mon Sep 17 00:00:00 2001 From: ice Date: Tue, 15 Aug 2023 16:30:58 +0800 Subject: [PATCH] Update closure.md fix Document not found (404) about closure example --- src/advance/functional-programing/closure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/advance/functional-programing/closure.md b/src/advance/functional-programing/closure.md index 81aeffc8..f71d6ce1 100644 --- a/src/advance/functional-programing/closure.md +++ b/src/advance/functional-programing/closure.md @@ -303,7 +303,7 @@ where } ``` -上面的缓存有一个很大的问题:只支持 `u32` 类型的值,若我们想要缓存 `&str` 类型,显然就行不通了,因此需要将 `u32` 替换成泛型 `E`,该练习就留给读者自己完成,具体代码可以参考[这里](https://practice.rs/functional-programing/cloure.html#closure-in-structs) +上面的缓存有一个很大的问题:只支持 `u32` 类型的值,若我们想要缓存 `&str` 类型,显然就行不通了,因此需要将 `u32` 替换成泛型 `E`,该练习就留给读者自己完成,具体代码可以参考[这里](https://github.com/sunface/rust-by-practice/blob/master/zh-CN/src/functional-programing/closure.md) ## 捕获作用域中的值