From a7d5a9c99a5426aeb64b9ef91d928a1815a3c962 Mon Sep 17 00:00:00 2001 From: Yuya Nishihara Date: Thu, 4 Apr 2024 23:41:36 +0900 Subject: [PATCH] commit: actually remove boxing from CommitIteratorExt::ids() Also simplified lifetime bound a bit. --- lib/src/commit.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/commit.rs b/lib/src/commit.rs index 7a82aefa5e..4116ff76d6 100644 --- a/lib/src/commit.rs +++ b/lib/src/commit.rs @@ -164,15 +164,15 @@ impl Commit { } pub trait CommitIteratorExt<'c, I> { - fn ids(self) -> impl Iterator + 'c; + fn ids(self) -> impl Iterator; } impl<'c, I> CommitIteratorExt<'c, I> for I where - I: Iterator + 'c, + I: Iterator, { - fn ids(self) -> impl Iterator + 'c { - Box::new(self.map(|commit| commit.id())) + fn ids(self) -> impl Iterator { + self.map(|commit| commit.id()) } }