From 0f3536f87a73b378c3df7867f45d23a4559c3f8d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 10 Sep 2022 20:31:42 +0000 Subject: [PATCH] Do not use blanket impls when building for `c_bindings` The C bindings generator isn't capable of figuring out if a blanket impl applies in a given context, and instead opts to always write out any relevant impl's for a trait. Thus, blanket impls should be disabled when building with `#[cfg(c_bindings)]`. --- lightning/src/routing/scoring.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index a2492accf..a3d970715 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -162,6 +162,7 @@ pub trait LockableScore<'a> { /// use the Persister to persist it. pub trait WriteableScore<'a>: LockableScore<'a> + Writeable {} +#[cfg(not(c_bindings))] impl<'a, T> WriteableScore<'a> for T where T: LockableScore<'a> + Writeable {} /// (C-not exported) -- 2.39.5