From 99e808289137ac482bac04ab692a11d8dd479a48 Mon Sep 17 00:00:00 2001 From: Mathieu David Date: Tue, 28 Jun 2016 19:36:06 +0200 Subject: [PATCH] Derive Clone and Debug for Chapter and Book --- src/book/book.rs | 1 + src/book/chapter.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/book/book.rs b/src/book/book.rs index c5e46de8..18572545 100644 --- a/src/book/book.rs +++ b/src/book/book.rs @@ -4,6 +4,7 @@ use book::chapter::Chapter; /// The `Book` struct contains the metadata and chapters for one language of the book. /// Multiple `Book` structs are combined in the `MDBook` struct to support multi-language books. +#[derive(Debug, Clone)] pub struct Book { metadata: BookMetadata, diff --git a/src/book/chapter.rs b/src/book/chapter.rs index 23244cb5..db8ce3ea 100644 --- a/src/book/chapter.rs +++ b/src/book/chapter.rs @@ -2,6 +2,7 @@ use std::path; /// The Chapter struct holds the title of the chapter as written in the SUMMARY.md file, /// the location of the markdown file containing the content and eventually sub-chapters +#[derive(Debug, Clone)] pub struct Chapter { title: String, file: path::PathBuf,