fix: compile warnings (#1774)

This commit is contained in:
Myriad-Dreamin 2025-05-22 11:37:44 +08:00 committed by GitHub
parent 7499dcb8c4
commit 7de64aefe5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 34 additions and 20 deletions

View file

@ -4,11 +4,12 @@ use std::sync::OnceLock;
use parking_lot::Mutex;
/// Represents a reference to some lazily executed query.
/// The compute function should be pure enough during call the [`compute`] and [`compute_ref`] so that the query result
/// is consistent through any implementations (the provided `f`).
/// The compute function should be pure enough during call the [`compute`] and
/// [`compute_with_context`] so that the query result is consistent through any
/// implementations (the provided `f`).
///
/// [`compute`]: Self::compute
/// [`compute_ref`]: Self::compute_ref
/// [`compute_with_context`]: Self::compute_with_context
pub struct QueryRef<Res, Err, QueryContext = ()> {
ctx: Mutex<Option<QueryContext>>,
/// `None` means no value has been computed yet.