From 68ebb62dbfc29415527baa06cac9d3c68aab106b Mon Sep 17 00:00:00 2001 From: Michael Bryan Date: Thu, 29 Jun 2017 17:20:46 +0800 Subject: [PATCH] Forgot PathBuf doesn't implement Default on stable --- src/loader/summary.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/loader/summary.rs b/src/loader/summary.rs index c56b86b1..85c4f7d6 100644 --- a/src/loader/summary.rs +++ b/src/loader/summary.rs @@ -62,7 +62,7 @@ pub struct Summary { /// entries. /// /// This is roughly the equivalent of `[Some section](./path/to/file.md)`. -#[derive(Debug, Clone, Default, PartialEq)] +#[derive(Debug, Clone, PartialEq)] struct Link { name: String, location: PathBuf, @@ -81,6 +81,17 @@ impl Link { } } +impl Default for Link { + fn default() -> Self { + Link { + name: String::new(), + location: PathBuf::new(), + number: None, + nested_items: Vec::new(), + } + } +} + #[derive(Debug, Clone, PartialEq)] enum SummaryItem { Link(Link),