Skip to content

Commit

Permalink
Merge pull request #139 from apartresearch/135-sort-neurons-by-layeri…
Browse files Browse the repository at this point in the history
…ndex-in-n2g-search

✨ Sort neuron search results
  • Loading branch information
albertsgarde authored Jan 28, 2024
2 parents 4d7744f + ff54d17 commit bfee3cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/service_providers/neuron2graph_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl ServiceProviderTrait for Neuron2GraphSearch {
.split(',')
.map(TokenSearch::from_str)
.collect::<Result<Vec<_>>>()?;
let results = token_searches
let mut results = token_searches
.into_iter()
.map(|token_search| {
let TokenSearch {
Expand All @@ -82,6 +82,7 @@ impl ServiceProviderTrait for Neuron2GraphSearch {
.with_context(|| "At least one token search should be provided.")?
.into_iter()
.collect::<Vec<_>>();
results.sort_unstable();

Ok(results)
}
Expand Down

0 comments on commit bfee3cd

Please sign in to comment.