From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/gix-traverse/src/commit.rs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'vendor/gix-traverse/src') 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 { } /// 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::{ -- cgit v1.2.3