mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-20 03:20:08 +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> {
|
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
|
impl<'c, I> CommitIteratorExt<'c, I> for I
|
||||||
where
|
where
|
||||||
I: Iterator<Item = &'c Commit> + 'c,
|
I: Iterator<Item = &'c Commit>,
|
||||||
{
|
{
|
||||||
fn ids(self) -> impl Iterator<Item = &'c CommitId> + 'c {
|
fn ids(self) -> impl Iterator<Item = &'c CommitId> {
|
||||||
Box::new(self.map(|commit| commit.id()))
|
self.map(|commit| commit.id())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue