From aebf21661984df45ff79826706f004425f765140 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Sat, 22 Jun 2024 06:26:44 +1000 Subject: [PATCH] Use 100 column width for rustdoc We use 100 column width for rustdoc in this project, while not a super hard rule the docs on `read_scriptint` are long, using the 100 column width reduces the line count a reasonable amount. No text changes, only whitespace. --- bitcoin/src/blockdata/script/push_bytes.rs | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/bitcoin/src/blockdata/script/push_bytes.rs b/bitcoin/src/blockdata/script/push_bytes.rs index e0e611626..e52bb905b 100644 --- a/bitcoin/src/blockdata/script/push_bytes.rs +++ b/bitcoin/src/blockdata/script/push_bytes.rs @@ -295,19 +295,15 @@ impl PushBytes { /// Decodes an integer in script(minimal CScriptNum) format. /// - /// Notice that this fails on overflow: the result is the same as in - /// bitcoind, that only 4-byte signed-magnitude values may be read as - /// numbers. They can be added or subtracted (and a long time ago, - /// multiplied and divided), and this may result in numbers which - /// can't be written out in 4 bytes or less. This is ok! The number - /// just can't be read as a number again. - /// This is a bit crazy and subtle, but it makes sense: you can load - /// 32-bit numbers and do anything with them, which back when mult/div - /// was allowed, could result in up to a 64-bit number. We don't want - /// overflow since that's surprising --- and we don't want numbers that - /// don't fit in 64 bits (for efficiency on modern processors) so we - /// simply say, anything in excess of 32 bits is no longer a number. - /// This is basically a ranged type implementation. + /// Notice that this fails on overflow: the result is the same as in bitcoind, that only 4-byte + /// signed-magnitude values may be read as numbers. They can be added or subtracted (and a long + /// time ago, multiplied and divided), and this may result in numbers which can't be written out + /// in 4 bytes or less. This is ok! The number just can't be read as a number again. This is a + /// bit crazy and subtle, but it makes sense: you can load 32-bit numbers and do anything with + /// them, which back when mult/div was allowed, could result in up to a 64-bit number. We don't + /// want overflow since that's surprising --- and we don't want numbers that don't fit in 64 + /// bits (for efficiency on modern processors) so we simply say, anything in excess of 32 bits + /// is no longer a number. This is basically a ranged type implementation. /// /// This code is based on the `CScriptNum` constructor in Bitcoin Core (see `script.h`). pub fn read_scriptint(&self) -> Result {