From c221193237ad895560a2d998bb79cdaca63575c5 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Thu, 18 Jan 2024 00:42:55 +0000 Subject: [PATCH] [bindings] Mark `WithContext` log wrapper with no-export There's not a lot of reason for downstream users to use the `WithContext` wrapper, it mostly exists for our own downstream crates anyway, and dealing with lifetimes in bindings isn't super practical, so simply no-export it. --- lightning/src/util/logger.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lightning/src/util/logger.rs b/lightning/src/util/logger.rs index d1c768dc7..e48cefaa0 100644 --- a/lightning/src/util/logger.rs +++ b/lightning/src/util/logger.rs @@ -158,6 +158,9 @@ pub trait Logger { } /// Adds relevant context to a [`Record`] before passing it to the wrapped [`Logger`]. +/// +/// This is not exported to bindings users as lifetimes are problematic and there's little reason +/// for this to be used downstream anyway. pub struct WithContext<'a, L: Deref> where L::Target: Logger { /// The logger to delegate to after adding context to the record. logger: &'a L, -- 2.39.5