From 3f5a554c6f876c6ef1e1c1312c246fd8008f3227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=99=BE=E7=B1=B3?= Date: Wed, 31 Aug 2022 15:49:21 +0800 Subject: [PATCH] Update global-variable.md --- src/advance/global-variable.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/advance/global-variable.md b/src/advance/global-variable.md index 05078bbd..0148ee9c 100644 --- a/src/advance/global-variable.md +++ b/src/advance/global-variable.md @@ -136,7 +136,7 @@ error[E0015]: calls in statics are limited to constant functions, tuple structs #### lazy_static -[`lazy_static`](https://github.com/rust-lang-nursery/lazy-static.rs)是社区提供的非常强大的宏,用于懒初始化静态变量,之前的静态变量都是在编译器初始化的,因此无法使用函数调用进行赋值,而`lazy_static`允许我们在运行期初始化静态变量! +[`lazy_static`](https://github.com/rust-lang-nursery/lazy-static.rs)是社区提供的非常强大的宏,用于懒初始化静态变量,之前的静态变量都是在编译期初始化的,因此无法使用函数调用进行赋值,而`lazy_static`允许我们在运行期初始化静态变量! ```rust use std::sync::Mutex;