diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /vendor/gix-traverse/src | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.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.rs | 18 |
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::{ |