正如「Rust 中的内存安全- 2」所说的,将一个变量赋值给另一个变量会将所有权转移。 let v: Vec = Vec::new(); let v1 = v; // v1 is the new owner.
確定! 回上一頁