Skip to content

Commit eb0f896

Browse files
committed
Use scheduler.is_running()
1 parent 71bb89f commit eb0f896

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/imex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ where
750750
/// This also verifies that IO is not running during the export.
751751
async fn export_database(context: &Context, dest: &Path, passphrase: String) -> Result<()> {
752752
ensure!(
753-
context.scheduler.read().await.is_none(),
753+
!context.scheduler.is_running().await,
754754
"cannot export backup, IO is running"
755755
);
756756
let now = time().try_into().context("32-bit UNIX time overflow")?;

src/imex/transfer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> {
374374
"Cannot import backups to accounts in use."
375375
);
376376
ensure!(
377-
context.scheduler.read().await.is_none(),
377+
!context.scheduler.is_running().await,
378378
"cannot import backup, IO is running"
379379
);
380380

0 commit comments

Comments
 (0)