fix doc comments

This commit is contained in:
Floris Bruynooghe
2023-02-22 18:50:32 +01:00
parent 0ef8d57881
commit 5833a9b347
3 changed files with 6 additions and 5 deletions

View File

@@ -78,9 +78,8 @@ impl BackupProvider {
/// or database are happening, this is done by calling the [`Accounts::stop_io`] or
/// [`Context::stop_io`] APIs first.
///
/// This will acquire the global "ongoing process" mutex. You must call
/// [`BackupProvider::join`] after creating this struct, otherwise this will not respect
/// the possible cancellation of the "ongoing process".
/// This will acquire the global "ongoing process" mutex, which can be used to cancel
/// the process.
///
/// [`Accounts::stop_io`]: crate::accounts::Accounts::stop_io
pub async fn prepare(context: &Context) -> Result<Self> {
@@ -292,7 +291,7 @@ impl From<SendProgress> for EventType {
/// This is a long running operation which will only when completed.
///
/// Using [`Qr`] as argument is a bit odd as it only accepts one specific variant of it. It
/// does avoid having [`sendme::provider::Ticket`] in the primary API however, without
/// does avoid having [`iroh::provider::Ticket`] in the primary API however, without
/// having to revert to untyped bytes.
pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> {
ensure!(

View File

@@ -504,7 +504,7 @@ fn decode_webrtc_instance(_context: &Context, qr: &str) -> Result<Qr> {
/// Decodes a [`DCBACKUP_SCHEME`] QR code.
///
/// The format of this scheme is `DCBACKUP:<encoded ticket>`. The encoding is the
/// [`sendme::provider::Ticket`]'s `Display` impl.
/// [`iroh::provider::Ticket`]'s `Display` impl.
fn decode_backup(qr: &str) -> Result<Qr> {
let payload = qr
.strip_prefix(DCBACKUP_SCHEME)

View File

@@ -1247,6 +1247,8 @@ pub(crate) async fn aeap_explanation_and_link(
///
/// The default is "Scan to set up second device for <account name (account addr)>". The
/// account name and address are looked up from the context.
///
/// [`Qr::Backup`]: crate::qr::Qr::Backup
pub(crate) async fn backup_transfer_qr(context: &Context) -> Result<String> {
let contact = Contact::get_by_id(context, ContactId::SELF).await?;
let addr = contact.get_addr();