Skip to content

Commit 18f80d3

Browse files
committed
Avoid blanket impls in bindings builds
The C bindings implements `Deref` for all traits, so having a blanket `Deref` implementation ends up conflicting with this.
1 parent a05b39f commit 18f80d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lightning/src/routing/scoring.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ pub trait Score : ScoreLookUp + ScoreUpdate $(+ $supertrait)* {}
133133
#[cfg(not(c_bindings))]
134134
impl<T: ScoreLookUp + ScoreUpdate $(+ $supertrait)*> Score for T {}
135135

136+
#[cfg(not(c_bindings))]
136137
impl<S: ScoreLookUp, T: Deref<Target=S>> ScoreLookUp for T {
137138
type ScoreParams = S::ScoreParams;
138139
fn channel_penalty_msat(
@@ -142,6 +143,7 @@ impl<S: ScoreLookUp, T: Deref<Target=S>> ScoreLookUp for T {
142143
}
143144
}
144145

146+
#[cfg(not(c_bindings))]
145147
impl<S: ScoreUpdate, T: DerefMut<Target=S>> ScoreUpdate for T {
146148
fn payment_path_failed(&mut self, path: &Path, short_channel_id: u64) {
147149
self.deref_mut().payment_path_failed(path, short_channel_id)

0 commit comments

Comments
 (0)