From 3f3fec5010a97f7d11f00b9c3eb2f05e167a1472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Fri, 2 Aug 2024 11:33:51 +0200 Subject: [PATCH] fix(iroh-net): Fix a compiler error with newer `derive_more` versions (#2578) ## Description The `#[derive(Debug)]` used to generate an impl like this: ```rust #[automatically_derived] impl<'a> ::core::fmt::Debug for Accept<'a> where quinn::Accept<'a>: ::core::fmt::Debug, Endpoint: ::core::fmt::Debug, { // ... } ``` But `quinn::Accept` doesn't implement `Debug`. ## Breaking Changes None ## Notes & open questions I'm... Really stumped on what changed in `derive_more`. When I expand the macro, in both versions there's a `Debug` bound on `quinn::Accept`, which just can't be right... Anyhow. ## Change checklist - [X] Self-review. - ~~[ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant.~~ - ~~[ ] Tests if relevant.~~ - [X] All breaking changes documented. --- Cargo.lock | 8 ++++---- iroh-docs/src/store/fs/tables.rs | 1 + iroh-net/src/endpoint.rs | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4b06c11628..af8e7a5224 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1178,18 +1178,18 @@ dependencies = [ [[package]] name = "derive_more" -version = "1.0.0-beta.6" +version = "1.0.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7abbfc297053be59290e3152f8cbcd52c8642e0728b69ee187d991d4c1af08d" +checksum = "3249c0372e72f5f93b5c0ca54c0ab76bbf6216b6f718925476fd9bc4ffabb4fe" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "1.0.0-beta.6" +version = "1.0.0-beta.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bba3e9872d7c58ce7ef0fcf1844fcc3e23ef2a58377b50df35dd98e42a5726e" +checksum = "27d919ced7590fc17b5d5a3c63b662e8a7d2324212c4e4dbbed975cafd22d16d" dependencies = [ "proc-macro2", "quote", diff --git a/iroh-docs/src/store/fs/tables.rs b/iroh-docs/src/store/fs/tables.rs index f3f1f207a6..898fffca4d 100644 --- a/iroh-docs/src/store/fs/tables.rs +++ b/iroh-docs/src/store/fs/tables.rs @@ -118,6 +118,7 @@ pub struct Tables<'tx> { pub records_by_key: Table<'tx, RecordsByKeyId<'static>, ()>, pub namespaces: Table<'tx, &'static [u8; 32], (u8, &'static [u8; 32])>, pub latest_per_author: Table<'tx, LatestPerAuthorKey<'static>, LatestPerAuthorValue<'static>>, + #[debug("MultimapTable")] pub namespace_peers: MultimapTable<'tx, &'static [u8; 32], (Nanos, &'static PeerIdBytes)>, pub download_policy: Table<'tx, &'static [u8; 32], &'static [u8]>, pub authors: Table<'tx, &'static [u8; 32], &'static [u8; 32]>, diff --git a/iroh-net/src/endpoint.rs b/iroh-net/src/endpoint.rs index 69019ad148..9b844467aa 100644 --- a/iroh-net/src/endpoint.rs +++ b/iroh-net/src/endpoint.rs @@ -898,6 +898,7 @@ impl Endpoint { #[pin_project::pin_project] pub struct Accept<'a> { #[pin] + #[debug("quinn::Accept")] inner: quinn::Accept<'a>, magic_ep: Endpoint, }