mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Clippy; remove forgotten dbg! (#4338)
This commit is contained in:
@@ -103,7 +103,7 @@ impl BackupProvider {
|
||||
let context_dir = context
|
||||
.get_blobdir()
|
||||
.parent()
|
||||
.ok_or(anyhow!("Context dir not found"))?;
|
||||
.ok_or_else(|| anyhow!("Context dir not found"))?;
|
||||
let dbfile = context_dir.join(DBFILE_BACKUP_NAME);
|
||||
if fs::metadata(&dbfile).await.is_ok() {
|
||||
fs::remove_file(&dbfile).await?;
|
||||
@@ -497,7 +497,7 @@ async fn on_blob(
|
||||
let context_dir = context
|
||||
.get_blobdir()
|
||||
.parent()
|
||||
.ok_or(anyhow!("Context dir not found"))?;
|
||||
.ok_or_else(|| anyhow!("Context dir not found"))?;
|
||||
let dbfile = context_dir.join(DBFILE_BACKUP_NAME);
|
||||
if fs::metadata(&dbfile).await.is_ok() {
|
||||
fs::remove_file(&dbfile).await?;
|
||||
|
||||
@@ -500,7 +500,7 @@ fn decode_webrtc_instance(_context: &Context, qr: &str) -> Result<Qr> {
|
||||
fn decode_backup(qr: &str) -> Result<Qr> {
|
||||
let payload = qr
|
||||
.strip_prefix(DCBACKUP_SCHEME)
|
||||
.ok_or(anyhow!("invalid DCBACKUP scheme"))?;
|
||||
.ok_or_else(|| anyhow!("invalid DCBACKUP scheme"))?;
|
||||
let ticket: iroh::provider::Ticket = payload.parse().context("invalid DCBACKUP payload")?;
|
||||
Ok(Qr::Backup { ticket })
|
||||
}
|
||||
|
||||
@@ -367,7 +367,6 @@ async fn test_no_message_id_header() {
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
dbg!(&received);
|
||||
assert!(received.is_none());
|
||||
|
||||
assert!(!t
|
||||
|
||||
Reference in New Issue
Block a user