Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation Chapter 4 #171

Merged
merged 2 commits into from
Mar 9, 2023
Merged

Translation Chapter 4 #171

merged 2 commits into from
Mar 9, 2023

Conversation

Jzow
Copy link
Contributor

@Jzow Jzow commented Sep 27, 2022

Description

Related Issue:

Pre-commit steps

  • Tested on QEMU and real HW Rasperry Pi.
    • Not needed if it is just a README change or similar.
  • Ran ./contributor_setup.sh followed by ./devtool ready_for_publish
    • You'll need Ruby with Bundler and NPM installed locally.
    • If no Rust-related files were changed, ./devtool ready_for_publish_no_rust can be used instead (faster).
    • This step is optional, but much appreciated if done.

link #166

@Jzow
Copy link
Contributor Author

Jzow commented Sep 27, 2022

@colachg Please review, thanks

@eldruin eldruin mentioned this pull request Feb 17, 2023
17 tasks
@Phantato
Copy link

since it's about translation, I think commenting in Chinese is OK?

@Jzow
Copy link
Contributor Author

Jzow commented Feb 19, 2023

since it's about translation, I think commenting in Chinese is OK?

当然可以

@Jzow
Copy link
Contributor Author

Jzow commented Feb 21, 2023

你可以check一下,如果没有问题,我们就需要进行合并。


然而`static QEMU_OUTPUT`不允许调用具有`&mut self`的函数。
为此,我们需要`static mut`,但是调用改变`static mut`状态的函数是不安全的。
这个是Rust编译器对此的推理,它无法再阻止核心/线程同时改变数据(它是全局的,所以每个人都可以从任何地方引用它,检查程序借用在这里帮不上忙)。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原文用的是并发地改变数据而非同时,应该还是有区别的。另外borrow checker 似乎直译成借用检查器比较常见?

@Jzow Jzow requested a review from Phantato March 2, 2023 23:57
Copy link

@Phantato Phantato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Jzow
Copy link
Contributor Author

Jzow commented Mar 5, 2023

如果你有时间可以尝试翻译第五章,我继续第六章。

@eldruin
Copy link
Member

eldruin commented Mar 6, 2023

@Jzow Please let us know when this is ready for merge

@Jzow
Copy link
Contributor Author

Jzow commented Mar 6, 2023

@Jzow Please let us know when this is ready for merge

This PR can be merged

Copy link
Member

@eldruin eldruin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@eldruin eldruin merged commit 49a2527 into rust-embedded:master Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants