summaryrefslogtreecommitdiffstats
path: root/vendor/gix-traverse/src
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix-traverse/src')
-rw-r--r--vendor/gix-traverse/src/commit.rs18
1 files changed, 4 insertions, 14 deletions
diff --git a/vendor/gix-traverse/src/commit.rs b/vendor/gix-traverse/src/commit.rs
index 890fde2a9..6e7e0c9e7 100644
--- a/vendor/gix-traverse/src/commit.rs
+++ b/vendor/gix-traverse/src/commit.rs
@@ -8,24 +8,20 @@ pub struct Ancestors<Find, Predicate, StateMut> {
}
/// Specify how to handle commit parents during traversal.
-#[derive(Copy, Clone)]
+#[derive(Default, Copy, Clone)]
pub enum Parents {
/// Traverse all parents, useful for traversing the entire ancestry.
+ #[default]
All,
/// Only traverse along the first parent, which commonly ignores all branches.
First,
}
-impl Default for Parents {
- fn default() -> Self {
- Parents::All
- }
-}
-
/// Specify how to sort commits during traversal.
-#[derive(Copy, Clone)]
+#[derive(Default, Debug, Copy, Clone)]
pub enum Sorting {
/// Commits are sorted as they are mentioned in the commit graph.
+ #[default]
Topological,
/// Commits are sorted by their commit time in descending order, that is newest first.
///
@@ -46,12 +42,6 @@ pub enum Sorting {
},
}
-impl Default for Sorting {
- fn default() -> Self {
- Sorting::Topological
- }
-}
-
///
pub mod ancestors {
use std::{