From 974e1c4e4f21770ff40bce52bef699de3755f634 Mon Sep 17 00:00:00 2001 From: sunface Date: Sat, 12 Feb 2022 16:16:48 +0800 Subject: [PATCH] update readme.md --- README.md | 2 +- book/contents/advance/unsafe/superpowers.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87b6ec2b..2a3627ee 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ - 国内镜像: https://book.rust.team - 知乎: [支持章节内目录跳转,很好用!](https://www.zhihu.com/column/c_1452781034895446017) -- 最近修订: 2022-02-11 新增 [unsafe简介](https://zhuanlan.zhihu.com/p/466269892) +- 最近修订: 2022-02-11 新增 [unsafe之五种兵器](https://zhuanlan.zhihu.com/p/466613792) - Rust版本: Rust edition 2021 - QQ交流群:1009730433 diff --git a/book/contents/advance/unsafe/superpowers.md b/book/contents/advance/unsafe/superpowers.md index c76e064b..5b328e40 100644 --- a/book/contents/advance/unsafe/superpowers.md +++ b/book/contents/advance/unsafe/superpowers.md @@ -1,5 +1,5 @@ # 五种兵器 -在[上文](https://course.rs/advance/unsafe/intro.html)中,我们提到了 `unsafe` 在 Rust 中拥有的五种超能力,下面一起来看看。 +古龙有一部小说,名为"七种兵器",其中每一种都精妙绝伦,令人闻风丧胆,而 `unsafe` 也有五种兵器,它们可以让你拥有其它代码无法实现的能力,同时它们也像七种兵器一样令人闻风丧胆,下面一起来看看庐山真面目。 ## 解引用原生指针 原生指针(raw pointer) 又称裸指针,在功能上跟引用类似,同时它也需要显式地注明可变性。但是又和引用有所不同,原生指针长这样: `*const T` 和 `*mut T`,它们分别代表了不可变和可变。