mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-02-22 20:22:18 +08:00
comment没有翻译
添加翻译
This commit is contained in:
parent
f873a162ef
commit
91ae3de189
@ -7,7 +7,7 @@ fn main() {
|
||||
}
|
||||
|
||||
// ANCHOR: here
|
||||
fn calculate_length(s: &String) -> usize { // s is a reference to a String
|
||||
fn calculate_length(s: &String) -> usize { // s是String的引用
|
||||
s.len()
|
||||
} // 这里,s 离开了作用域。但因为它并不拥有引用值的所有权,
|
||||
// 所以什么也不会发生
|
||||
|
Loading…
Reference in New Issue
Block a user