sync dependencies from origin article (#827)

This commit is contained in:
Han Han
2020-06-29 22:13:05 +08:00
committed by GitHub
parent 7f9ff717b4
commit 0b15229a5e

View File

@@ -275,10 +275,10 @@ pub extern "C" fn _start() -> ! {
# in Cargo.toml
[dependencies]
volatile = "0.2.3"
volatile = "0.2.6"
```
`0.2.3` 表示一个**语义版本号**[semantic version number](https://semver.org/)),在 cargo 文档的[《指定依赖项》章节](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html)可以找到与它相关的使用指南。
`0.2.6` 表示一个**语义版本号**[semantic version number](https://semver.org/)),在 cargo 文档的[《指定依赖项》章节](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html)可以找到与它相关的使用指南。
现在,我们使用它来完成 VGA 缓冲区的 volatile 写入操作。我们将 `Buffer` 类型的定义修改为下列代码:
@@ -643,4 +643,4 @@ fn panic(info: &PanicInfo) -> ! {
## 下篇预告
下一篇文章中,我们将会讲述如何配置 Rust 内置的单元测试框架。我们还将为本文编写的 VGA 缓冲区模块添加基础的单元测试项目。
下一篇文章中,我们将会讲述如何配置 Rust 内置的单元测试框架。我们还将为本文编写的 VGA 缓冲区模块添加基础的单元测试项目。