Skip to content

Commit

Permalink
try_map_guardにdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Sep 18, 2024
1 parent 22c36e0 commit 11be136
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/voicevox_core/src/__internal/interop/raii.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ pub enum MaybeClosed<T> {

// [`mapped_lock_guards`]のようなことをやるためのユーティリティ。
//
// `T: 'static`が入っているのは、`T` outlive `G`の関係にすることによりouroborosに突っ込んでSafe
// Rustで記述しきるため。
//
// [`mapped_lock_guards`]: https://github.com/rust-lang/rust/issues/117108
pub fn try_map_guard<'a, G, F, T, E>(guard: G, f: F) -> Result<impl Deref<Target = T> + 'a, E>
where
Expand Down

0 comments on commit 11be136

Please sign in to comment.