]> git.bitcoin.ninja Git - rust-lightning/commit
Make Readable::read a templated on the stream, not Readable itself
authorMatt Corallo <git@bluematt.me>
Mon, 24 Feb 2020 04:12:19 +0000 (23:12 -0500)
committerMatt Corallo <git@bluematt.me>
Wed, 4 Mar 2020 19:29:06 +0000 (14:29 -0500)
commit32ca8ec13e0928cbb4f7067a3fb6d41f39691d1c
tree665d6a884710c52b7e362dd2a74afcf750cd0cd3
parent39b62335b737e0ad40fc76aefb3d5d24ef64497a
Make Readable::read a templated on the stream, not Readable itself

This makes Readable symmetric with Writeable and makes sense -
something which is Readable should be Readable for any stream which
implements std::io::Read, not only for a stream type it decides on.

This solves some lifetime-compatibility issues in trying to read()
from a LengthLimitingReader in arbitrary Readable impls.
14 files changed:
fuzz/src/msg_targets/utils.rs
lightning/src/chain/keysinterface.rs
lightning/src/ln/chan_utils.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/channelmonitor.rs
lightning/src/ln/features.rs
lightning/src/ln/msgs.rs
lightning/src/ln/router.rs
lightning/src/ln/wire.rs
lightning/src/util/enforcing_trait_impls.rs
lightning/src/util/events.rs
lightning/src/util/ser.rs
lightning/src/util/ser_macros.rs