mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
update callback to take collection by ref
This commit is contained in:
@@ -31,7 +31,6 @@ use crate::qr::Qr;
|
|||||||
use anyhow::{anyhow, bail, ensure, format_err, Context as _, Result};
|
use anyhow::{anyhow, bail, ensure, format_err, Context as _, Result};
|
||||||
use async_channel::Receiver;
|
use async_channel::Receiver;
|
||||||
use futures_lite::StreamExt;
|
use futures_lite::StreamExt;
|
||||||
use sendme::blobs::Collection;
|
|
||||||
use sendme::get::{DataStream, Options};
|
use sendme::get::{DataStream, Options};
|
||||||
use sendme::protocol::AuthToken;
|
use sendme::protocol::AuthToken;
|
||||||
use sendme::provider::{DataSource, Event, Provider, Ticket};
|
use sendme::provider::{DataSource, Event, Provider, Ticket};
|
||||||
@@ -251,7 +250,7 @@ pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> {
|
|||||||
ticket.token,
|
ticket.token,
|
||||||
opts,
|
opts,
|
||||||
on_connected,
|
on_connected,
|
||||||
on_collection,
|
|_collection| async { Ok(()) },
|
||||||
on_blob,
|
on_blob,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
@@ -280,12 +279,6 @@ async fn on_connected() -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get callback when a collection is received from the provider.
|
|
||||||
#[allow(clippy::unused_async)]
|
|
||||||
async fn on_collection(_collection: Collection) -> Result<()> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get callback when a blob is received from the provider.
|
/// Get callback when a blob is received from the provider.
|
||||||
async fn on_blob(
|
async fn on_blob(
|
||||||
context: &Context,
|
context: &Context,
|
||||||
|
|||||||
Reference in New Issue
Block a user