Fixup from merge: make BackupProvider clone again

This commit is contained in:
Floris Bruynooghe
2023-03-29 17:25:41 +02:00
parent 19f8dc95dc
commit 0c3613dbf4

View File

@@ -27,6 +27,7 @@ use std::net::Ipv4Addr;
use std::ops::Deref; use std::ops::Deref;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::pin::Pin; use std::pin::Pin;
use std::sync::Arc;
use std::task::Poll; use std::task::Poll;
use anyhow::{anyhow, bail, ensure, format_err, Context as _, Result}; use anyhow::{anyhow, bail, ensure, format_err, Context as _, Result};
@@ -78,7 +79,7 @@ pub struct BackupProvider {
/// The ticket to retrieve the backup collection. /// The ticket to retrieve the backup collection.
ticket: Ticket, ticket: Ticket,
/// Guard to cancel the provider on drop. /// Guard to cancel the provider on drop.
_drop_guard: tokio_util::sync::DropGuard, _drop_guard: Arc<tokio_util::sync::DropGuard>,
} }
impl BackupProvider { impl BackupProvider {
@@ -151,7 +152,7 @@ impl BackupProvider {
Ok(Self { Ok(Self {
handle, handle,
ticket, ticket,
_drop_guard: drop_token.drop_guard(), _drop_guard: Arc::new(drop_token.drop_guard()),
}) })
} }