mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-26 14:00:51 +00:00
commit: actually remove boxing from CommitIteratorExt::ids()
Also simplified lifetime bound a bit.
This commit is contained in:
parent
32afea198a
commit
a7d5a9c99a
1 changed files with 4 additions and 4 deletions
|
@ -164,15 +164,15 @@ impl Commit {
|
|||
}
|
||||
|
||||
pub trait CommitIteratorExt<'c, I> {
|
||||
fn ids(self) -> impl Iterator<Item = &'c CommitId> + 'c;
|
||||
fn ids(self) -> impl Iterator<Item = &'c CommitId>;
|
||||
}
|
||||
|
||||
impl<'c, I> CommitIteratorExt<'c, I> for I
|
||||
where
|
||||
I: Iterator<Item = &'c Commit> + 'c,
|
||||
I: Iterator<Item = &'c Commit>,
|
||||
{
|
||||
fn ids(self) -> impl Iterator<Item = &'c CommitId> + 'c {
|
||||
Box::new(self.map(|commit| commit.id()))
|
||||
fn ids(self) -> impl Iterator<Item = &'c CommitId> {
|
||||
self.map(|commit| commit.id())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue