use crate::book::Book;
#[derive(Debug)]
pub struct Shelf {
pub name: String,
pub books: Vec<Book>
}
impl Shelf {
pub fn put_book(&mut self, book: Book) {
self.books.push(book);
}
pub fn named(name: String) -> Shelf {
Shelf {
name,
books: Vec::new()
}
}
}