Forgot PathBuf doesn't implement Default on stable
This commit is contained in:
parent
66e4898c44
commit
68ebb62dbf
|
@ -62,7 +62,7 @@ pub struct Summary {
|
||||||
/// entries.
|
/// entries.
|
||||||
///
|
///
|
||||||
/// This is roughly the equivalent of `[Some section](./path/to/file.md)`.
|
/// This is roughly the equivalent of `[Some section](./path/to/file.md)`.
|
||||||
#[derive(Debug, Clone, Default, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
struct Link {
|
struct Link {
|
||||||
name: String,
|
name: String,
|
||||||
location: PathBuf,
|
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)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
enum SummaryItem {
|
enum SummaryItem {
|
||||||
Link(Link),
|
Link(Link),
|
||||||
|
|
Loading…
Reference in New Issue