mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
remove redundant hashset conversion
Summary: Since the find_commits_to_send method was added, common is already a hashset not a vector, so it doesn't needed to be converted to a hashset. Reviewed By: quark-zju Differential Revision: D30622028 fbshipit-source-id: e5d1b6c60115d13c906b25142043652ba9e89d70
This commit is contained in:
parent
0ffe94b9f0
commit
0b2f5849cb
@ -58,7 +58,6 @@ use stats::prelude::*;
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
convert::TryInto,
|
||||
iter::FromIterator,
|
||||
sync::Arc,
|
||||
};
|
||||
use tunables::tunables;
|
||||
@ -261,7 +260,6 @@ async fn find_commits_to_send(
|
||||
heads: &[HgChangesetId],
|
||||
lca_hint: &Arc<dyn LeastCommonAncestorsHint>,
|
||||
) -> Result<Vec<ChangesetId>, Error> {
|
||||
let common_heads: HashSet<_> = HashSet::from_iter(common.iter());
|
||||
let changeset_fetcher = blobrepo.get_changeset_fetcher();
|
||||
|
||||
let heads = hg_to_bonsai_stream(
|
||||
@ -269,7 +267,7 @@ async fn find_commits_to_send(
|
||||
&blobrepo,
|
||||
heads
|
||||
.iter()
|
||||
.filter(|head| !common_heads.contains(head))
|
||||
.filter(|head| !common.contains(head))
|
||||
.cloned()
|
||||
.collect(),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user