]> git.bitcoin.ninja Git - rust-lightning/commit
Optimize `BufReader` somewhat for the only used case
authorMatt Corallo <git@bluematt.me>
Fri, 16 Aug 2024 18:47:38 +0000 (18:47 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 19 Aug 2024 14:55:28 +0000 (14:55 +0000)
commitf8b7ad242dcadc610c7da9a08b4861b2fa396512
tree8e8f5822bd27ddbf922b9f004c1c69b8a93b472a
parentaadf233d6c2974672e061d2ae755ac1f238812c9
Optimize `BufReader` somewhat for the only used case

`rust-bitcoin` doesn't ever actually *use* its `BufRead`
requirement when deserializing objects, and forcing it is somewhat
inefficient, so we optimize the only (actual) case here by passing
reads straight through to the backing stream.
lightning/src/util/ser.rs