3 Commits

Author SHA1 Message Date
c39a39a889 Remove unnecessary lifetime param and use new RNG API
Some checks failed
Build docker image / Build-Docker-Image (push) Has been cancelled
rust-clippy analyze / Run rust-clippy analyzing (push) Has been cancelled
2025-10-14 17:58:03 +02:00
b1c9f2ccf8 Merge pull request #45 from flibusta-apps/dependabot/github_actions/github/codeql-action-4
Bump github/codeql-action from 3 to 4
2025-10-14 17:57:50 +02:00
dependabot[bot]
b4b0a10ce7 Bump github/codeql-action from 3 to 4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-08 08:04:11 +00:00
2 changed files with 3 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ jobs:
continue-on-error: true continue-on-error: true
- name: Upload analysis results to GitHub - name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v3 uses: github/codeql-action/upload-sarif@v4
with: with:
sarif_file: rust-clippy-results.sarif sarif_file: rust-clippy-results.sarif
wait-for-processing: true wait-for-processing: true

View File

@@ -4,7 +4,7 @@ use serde::de::DeserializeOwned;
use crate::meilisearch::GetId; use crate::meilisearch::GetId;
pub async fn get_random_item<'a, T>(index: Index, filter: String) -> i32 pub async fn get_random_item<T>(index: Index, filter: String) -> i32
where where
T: DeserializeOwned + GetId + 'static + Send + Sync, T: DeserializeOwned + GetId + 'static + Send + Sync,
{ {
@@ -15,7 +15,7 @@ where
.await .await
.unwrap(); .unwrap();
let offset: usize = rand::thread_rng().gen_range(0..result.estimated_total_hits.unwrap()); let offset: usize = rand::rng().random_range(0..result.estimated_total_hits.unwrap());
let result = index let result = index
.search() .search()