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.
|
||||
///
|
||||
/// 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),
|
||||
|
|
Loading…
Reference in New Issue