mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-27 15:37:03 +00:00
Merge branch 'main' into next-v2
This commit is contained in:
@@ -27,9 +27,16 @@ use crate::permission::BucketKeyPerm;
|
||||
/// See issues: #649, #723
|
||||
pub struct LockedHelper<'a>(
|
||||
pub(crate) &'a Garage,
|
||||
pub(crate) tokio::sync::MutexGuard<'a, ()>,
|
||||
pub(crate) Option<tokio::sync::MutexGuard<'a, ()>>,
|
||||
);
|
||||
|
||||
impl<'a> Drop for LockedHelper<'a> {
|
||||
fn drop(&mut self) {
|
||||
// make it explicit that the mutexguard lives until here
|
||||
drop(self.1.take())
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::ptr_arg)]
|
||||
impl<'a> LockedHelper<'a> {
|
||||
pub fn bucket(&self) -> BucketHelper<'a> {
|
||||
|
||||
Reference in New Issue
Block a user