所有公开日志

所有WHY42公开日志的联合展示。您可以通过选择日志类型、输入用户名(区分大小写)或相关页面(区分大小写)筛选日志条目。

日志
  • 2024年6月26日 (三) 10:04 Riguz 留言 贡献创建了页面Rust iter and into iter (创建页面,内容为“* iter() iterates over the items by reference * iter_mut() iterates over the items, giving a mutable reference to each item * into_iter() iterates over the items, moving them into the new scope So for x in my_vec { ... } is essentially equivalent to my_vec.into_iter().for_each(|x| ... ) - both move the elements of my_vec into the ... scope. If you just need to look at the data, use iter, if you need to edit/mutate it, use iter_mut, and if you need to give it…”)