Skip to content

Commit a2927a6

Browse files
authored
ref(deps): Upgrade to iroh 0.4.0 (#4245)
This moves us back to a released version; - Ticket is now opaque, need to use accessor functions. - Ticket now ensures it is valid itself, no need to inspect it's inners. Deserialisation would fail if it was bad. - The git version was accidentally used with default-features enabled and thus pulled in a few too many dependencies. They are now gone.
1 parent 943c8a1 commit a2927a6

File tree

4 files changed

+9
-137
lines changed

4 files changed

+9
-137
lines changed

Cargo.lock

Lines changed: 6 additions & 128 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ futures-lite = "1.12.0"
5252
hex = "0.4.0"
5353
humansize = "2"
5454
image = { version = "0.24.5", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] }
55-
# iroh = { version = "0.3.0", default-features = false }
56-
iroh = { git = 'https://github.com/n0-computer/iroh', branch = "main" }
55+
iroh = { version = "0.4.0", default-features = false }
5756
kamadak-exif = "0.5"
5857
lettre_email = { git = "https://github.com/deltachat/lettre", branch = "master" }
5958
libc = "0.2"

deny.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ skip = [
2828
{ name = "humantime", version = "<2.1" },
2929
{ name = "idna", version = "<0.3" },
3030
{ name = "nom", version = "<7.1" },
31-
{ name = "portable-atomic", version = "<1.0" },
3231
{ name = "quick-error", version = "<2.0" },
3332
{ name = "rand", version = "<0.8" },
3433
{ name = "rand_chacha", version = "<0.3" },
@@ -75,6 +74,5 @@ license-files = [
7574
github = [
7675
"async-email",
7776
"deltachat",
78-
"n0-computer",
7977
"quinn-rs",
8078
]

src/imex/transfer.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl BackupProvider {
182182
.spawn()?;
183183
context.emit_event(SendProgress::ProviderListening.into());
184184
info!(context, "Waiting for remote to connect");
185-
let ticket = provider.ticket(hash);
185+
let ticket = provider.ticket(hash)?;
186186
Ok((provider, ticket))
187187
}
188188

@@ -406,9 +406,6 @@ async fn get_backup_inner(context: &Context, qr: Qr) -> Result<()> {
406406
Qr::Backup { ticket } => ticket,
407407
_ => bail!("QR code for backup must be of type DCBACKUP"),
408408
};
409-
if ticket.addrs.is_empty() {
410-
bail!("ticket is missing addresses to dial");
411-
}
412409

413410
match transfer_from_provider(context, &ticket).await {
414411
Ok(()) => {
@@ -511,7 +508,7 @@ async fn on_blob(
511508

512509
if name.starts_with("db/") {
513510
let context = context.clone();
514-
let token = ticket.token.to_string();
511+
let token = ticket.token().to_string();
515512
jobs.lock().await.spawn(async move {
516513
if let Err(err) = context.sql.import(&path, token).await {
517514
error!(context, "cannot import database: {:#?}", err);

0 commit comments

Comments
 (0)