Skip to content

Commit d664618

Browse files
committed
Derive Clone and Debug for Chapter and Book
1 parent c69161c commit d664618

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/book/book.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use book::chapter::Chapter;
44

55
/// The `Book` struct contains the metadata and chapters for one language of the book.
66
/// Multiple `Book` structs are combined in the `MDBook` struct to support multi-language books.
7+
#[derive(Debug, Clone)]
78
pub struct Book {
89
metadata: BookMetadata,
910

src/book/chapter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::path;
22

33
/// The Chapter struct holds the title of the chapter as written in the SUMMARY.md file,
44
/// the location of the markdown file containing the content and eventually sub-chapters
5+
#[derive(Debug, Clone)]
56
pub struct Chapter {
67
title: String,
78
file: path::PathBuf,

0 commit comments

Comments
 (0)