Update global-variable.md

pull/773/head
Rustln 3 years ago committed by GitHub
parent 5a5bc0eec9
commit 022b39fe79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -360,10 +360,7 @@ impl Logger {
以上代码我们声明了一个 `global()` 关联函数,并在其内部调用 `get_or_init` 进行初始化 `Logger`,之后在不同线程上多次调用 `Logger::global()` 获取其实例:
```
Compiling study v0.1.0 (D:\Workplaces\Rust\study)
Finished dev [unoptimized + debuginfo] target(s) in 0.63s
Running `target\debug\study.exe`
```console
Logger is being created...
some message
other message

Loading…
Cancel
Save