mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Compare commits
3 Commits
8e4c3303f2
...
c39a39a889
| Author | SHA1 | Date | |
|---|---|---|---|
| c39a39a889 | |||
| b1c9f2ccf8 | |||
|
|
b4b0a10ce7 |
2
.github/workflows/rust-clippy.yml
vendored
2
.github/workflows/rust-clippy.yml
vendored
@@ -49,7 +49,7 @@ jobs:
|
||||
continue-on-error: true
|
||||
|
||||
- name: Upload analysis results to GitHub
|
||||
uses: github/codeql-action/upload-sarif@v3
|
||||
uses: github/codeql-action/upload-sarif@v4
|
||||
with:
|
||||
sarif_file: rust-clippy-results.sarif
|
||||
wait-for-processing: true
|
||||
|
||||
@@ -4,7 +4,7 @@ use serde::de::DeserializeOwned;
|
||||
|
||||
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
|
||||
T: DeserializeOwned + GetId + 'static + Send + Sync,
|
||||
{
|
||||
@@ -15,7 +15,7 @@ where
|
||||
.await
|
||||
.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
|
||||
.search()
|
||||
|
||||
Reference in New Issue
Block a user