]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Make `requires_unknown_bits_from` param type bindings compatible
authorMatt Corallo <git@bluematt.me>
Wed, 19 Jul 2023 20:11:35 +0000 (20:11 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 20 Jul 2023 21:43:52 +0000 (21:43 +0000)
While bindings should probably be able to figure out that this is
the same type as `Self`, for now we simply swap the type to make
the bindings generator have an easier go of it.

lightning/src/ln/features.rs

index 6309eea413adb4d913c45379baad6eca16bdeb83..5de383b1f4469273207441892a90d1d2c063494d 100644 (file)
@@ -728,7 +728,7 @@ impl<T: sealed::Context> Features<T> {
        }
 
        /// Returns true if this `Features` object contains required features unknown by `other`.
-       pub fn requires_unknown_bits_from(&self, other: &Features<T>) -> bool {
+       pub fn requires_unknown_bits_from(&self, other: &Self) -> bool {
                // Bitwise AND-ing with all even bits set except for known features will select required
                // unknown features.
                self.flags.iter().enumerate().any(|(i, &byte)| {