Skip to content

Commit

Permalink
Revert "Fixes no method named push_back on (newer) futures crate"
Browse files Browse the repository at this point in the history
This reverts commit cf29731.
  • Loading branch information
brainstorm committed Dec 16, 2022
1 parent cf29731 commit db0f39f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion htsget-http-core/src/http_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub async fn get_response_for_post_request(
let mut futures = FuturesOrdered::new();
for query in request.get_queries(id)? {
let owned_searcher = searcher.clone();
futures.push(tokio::spawn(
futures.push_back(tokio::spawn(
async move { owned_searcher.search(query).await },
));
}
Expand Down
2 changes: 1 addition & 1 deletion htsget-search/src/htsget/bcf_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ where
for (ref_seq_index, (name, _)) in header.contigs().iter().enumerate() {
let owned_name = name.to_owned();
let owned_reference_name = reference_name.clone();
futures.push(tokio::spawn(async move {
futures.push_back(tokio::spawn(async move {
if owned_name == owned_reference_name {
Some((ref_seq_index, owned_name))
} else {
Expand Down
2 changes: 1 addition & 1 deletion htsget-search/src/htsget/cram_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ where
let owned_next = next.clone();
let owned_predicate = predicate.clone();
let range = interval.clone();
futures.push(tokio::spawn(async move {
futures.push_back(tokio::spawn(async move {
if owned_predicate(&owned_record) {
Self::bytes_ranges_for_record(range, &owned_record, owned_next.offset())
} else {
Expand Down
4 changes: 2 additions & 2 deletions htsget-search/src/htsget/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,14 @@ where
DataBlock::Range(range) => {
let storage = self.get_storage();
let id = id.clone();
storage_futures.push(tokio::spawn(async move {
storage_futures.push_back(tokio::spawn(async move {
storage
.range_url(format.fmt_file(&id), RangeUrlOptions::from(range))
.await
}));
}
DataBlock::Data(data, class) => {
storage_futures.push(tokio::spawn(async move { Ok(S::data_url(data, class)) }));
storage_futures.push_back(tokio::spawn(async move { Ok(S::data_url(data, class)) }));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion htsget-search/src/htsget/vcf_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ where
for (index, name) in index.header().reference_sequence_names().iter().enumerate() {
let owned_name = name.to_owned();
let owned_reference_name = reference_name.clone();
futures.push(tokio::spawn(async move {
futures.push_back(tokio::spawn(async move {
if owned_name == owned_reference_name {
Some(index)
} else {
Expand Down

0 comments on commit db0f39f

Please sign in to comment.