summaryrefslogtreecommitdiffstats
path: root/vendor/gix-traverse/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 02:49:42 +0000
commit837b550238aa671a591ccf282dddeab29cadb206 (patch)
tree914b6b8862bace72bd3245ca184d374b08d8a672 /vendor/gix-traverse/src
parentAdding debian version 1.70.0+dfsg2-1. (diff)
downloadrustc-837b550238aa671a591ccf282dddeab29cadb206.tar.xz
rustc-837b550238aa671a591ccf282dddeab29cadb206.zip
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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::{