diff --git a/src/exercises/day-1/book-library.md b/src/exercises/day-1/book-library.md index 34f9b0b1..3623e6ae 100644 --- a/src/exercises/day-1/book-library.md +++ b/src/exercises/day-1/book-library.md @@ -18,8 +18,6 @@ Use this to create a library application. Copy the code below to and update the types to make it compile: ```rust,should_panic -// TODO: remove this when you're done with your implementation. -#![allow(unused_variables, dead_code)] {{#include book-library.rs:setup}} diff --git a/src/exercises/day-1/book-library.rs b/src/exercises/day-1/book-library.rs index 284045aa..9b6c67b6 100644 --- a/src/exercises/day-1/book-library.rs +++ b/src/exercises/day-1/book-library.rs @@ -104,8 +104,10 @@ fn main() { let library = Library::new(); //println!("Our library is empty: {}", library.is_empty()); - // - //library.add_book(Book::new("Lord of the Rings", 1954)); + + let favorite_book = Book::new("Lord of the Rings", 1954); + println!("Our favorite book {favorite_book} should go in the library"); + //library.add_book(favorite_book); //library.add_book(Book::new("Alice's Adventures in Wonderland", 1865)); // //library.print_books(); @@ -116,6 +118,9 @@ fn main() { //} // //println!("Our library has {} books", library.len()); + for book in library.books { + println!("{book}"); + } } // ANCHOR_END: main