使用Box<[T]>有什么好处,和Vec比有什么区别?

📝

内容提要

如题。 今天学习talent plan 关于raft的代码时候发现如下数据结构。 pub struct Config { pub net: labrpc::Network, n: usize, // use boxed slice to prohibit grow capacity. pub rafts:...

➡️

继续阅读