mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-09 05:58:55 +00:00
revset_graph: remove redundant boxing from reverse iterator constructor
This commit is contained in:
parent
a382e96168
commit
a80758ee1d
2 changed files with 2 additions and 4 deletions
|
@ -66,9 +66,7 @@ pub struct ReverseRevsetGraphIterator {
|
|||
}
|
||||
|
||||
impl ReverseRevsetGraphIterator {
|
||||
pub fn new<'revset>(
|
||||
input: Box<dyn Iterator<Item = (CommitId, Vec<RevsetGraphEdge>)> + 'revset>,
|
||||
) -> Self {
|
||||
pub fn new(input: impl IntoIterator<Item = (CommitId, Vec<RevsetGraphEdge>)>) -> Self {
|
||||
let mut entries = vec![];
|
||||
let mut reverse_edges: HashMap<CommitId, Vec<RevsetGraphEdge>> = HashMap::new();
|
||||
for (commit_id, edges) in input {
|
||||
|
|
|
@ -1591,7 +1591,7 @@ fn cmd_log(ui: &mut Ui, command: &CommandHelper, args: &LogArgs) -> Result<(), C
|
|||
let default_node_symbol = graph.default_node_symbol().to_owned();
|
||||
let forward_iter = TopoGroupedRevsetGraphIterator::new(revset.iter_graph());
|
||||
let iter: Box<dyn Iterator<Item = _>> = if args.reversed {
|
||||
Box::new(ReverseRevsetGraphIterator::new(Box::new(forward_iter)))
|
||||
Box::new(ReverseRevsetGraphIterator::new(forward_iter))
|
||||
} else {
|
||||
Box::new(forward_iter)
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue