exercises 06 done, onto structs
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
fn main() {
|
||||
// You can optionally experiment here.
|
||||
}
|
||||
fn main() {}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
@@ -10,8 +8,8 @@ mod tests {
|
||||
fn move_semantics4() {
|
||||
let mut x = Vec::new();
|
||||
let y = &mut x;
|
||||
let z = &mut x;
|
||||
y.push(42);
|
||||
let z = &mut x;
|
||||
z.push(13);
|
||||
assert_eq!(x, [42, 13]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user