Fixing main function errors in move_semantics/
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// move_semantics1.rs
|
||||
// Make me compile! Scroll down for hints :)
|
||||
|
||||
pub fn main() {
|
||||
fn main() {
|
||||
let vec0 = Vec::new();
|
||||
|
||||
let vec1 = fill_vec(vec0);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// move_semantics2.rs
|
||||
// Make me compile without changing line 10! Scroll down for hints :)
|
||||
|
||||
pub fn main() {
|
||||
fn main() {
|
||||
let vec0 = Vec::new();
|
||||
|
||||
let mut vec1 = fill_vec(vec0);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// (no lines with multiple semicolons necessary!)
|
||||
// Scroll down for hints :)
|
||||
|
||||
pub fn main() {
|
||||
fn main() {
|
||||
let vec0 = Vec::new();
|
||||
|
||||
let mut vec1 = fill_vec(vec0);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// in `fn main`, we instead create it within `fn fill_vec` and transfer the
|
||||
// freshly created vector from fill_vec to its caller. Scroll for hints!
|
||||
|
||||
pub fn main() {
|
||||
fn main() {
|
||||
let vec0 = Vec::new();
|
||||
|
||||
let mut vec1 = fill_vec(vec0);
|
||||
|
||||
Reference in New Issue
Block a user