refactor: build search without async

It didn't benefit from being async (nothing is
a future in there). For some reason Clippy didn't
complain despite the unused_async lint being
enabled.
This commit is contained in:
daimond113 2025-03-09 12:59:59 +01:00
parent 19d6a07851
commit 12c62d315d
No known key found for this signature in database
GPG key ID: 640DC95EC1190354
3 changed files with 6 additions and 2 deletions

View file

@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Changed
- Make search building not async (as it didn't benefit from it) by @daimond113
## [0.2.1] - 2025-03-02
### Changed
- Print more error info by @daimond113

View file

@ -122,7 +122,7 @@ async fn run() -> std::io::Result<()> {
.await
.expect("failed to get index config");
let (search_reader, search_writer, query_parser) = make_search(&project, &source).await;
let (search_reader, search_writer, query_parser) = make_search(&project, &source);
let app_data = web::Data::new(AppState {
storage: {

View file

@ -103,7 +103,7 @@ pub fn find_max_searchable(file: &IndexFile) -> Option<(&VersionId, &IndexFileEn
})
}
pub async fn make_search(
pub fn make_search(
project: &Project,
source: &PesdePackageSource,
) -> (IndexReader, IndexWriter, QueryParser) {