摘要: # 引用(reference) 像一个指针,因为它是一个地址,我们可以由此访问储存于该地址的属于其他变量的数据。 与指针不同,引用确保指向某个特定类型的有效值。 点击查看代码 ``` fn main() { let s1 = String::from("hello"); let len = calc 阅读全文
posted @ 2023-07-31 22:18 maoyang 阅读(57) 评论(0) 推荐(0)