Forgot PathBuf doesn't implement Default on stable

This commit is contained in:
Michael Bryan 2017-06-29 17:20:46 +08:00
parent 66e4898c44
commit 68ebb62dbf
1 changed files with 12 additions and 1 deletions

View File

@ -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),