Make method time on trait impl explitit to help bindings generator 2021-09-type-explicit-bounds
authorMatt Corallo <git@bluematt.me>
Thu, 23 Sep 2021 04:02:58 +0000 (04:02 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 23 Sep 2021 04:02:58 +0000 (04:02 +0000)
commitab49e4101fdc77a074a4db9fe2ff10acad7d1cc2
treeaa3509476b64cb4aa7bc5a4f11c1ca2c9e318090
parent401d03599d2ad5b7a446eeee2ccb670b47636895
Make method time on trait impl explitit to help bindings generator

Associated types in C bindings is somewhat of a misnomer - we
concretize each trait to a single struct. Thus, different trait
implementations must still have the same type, which defeats the
point of associated types.

In this particular case, however, we can reasonably special-case
the `Infallible` type, as an instance of it existing implies
something has gone horribly wrong.

In order to help our bindings code figure out how to do so when
referencing a parent trait's associated type, we specify the
explicit type in the implementation method signature.
lightning/src/ln/peer_handler.rs