rust-bitcoin-unsafe-fast/bitcoin/src
merge-script 4c8347a7ac
Merge rust-bitcoin/rust-bitcoin#3544: Favour `to_vec` over `to_bytes`
a51768af3f key: Deprecate to_bytes (Tobin C. Harding)
3af3239ad0 script: Re-order functions (Tobin C. Harding)
db40297f87 script: deprecate to_bytes (Tobin C. Harding)
c5cd0db493 Revert the change to to_bytes (Tobin C. Harding)
dc2ca785d2 Add to_vec and deprecate to_bytes for array types (Tobin C. Harding)
a6b7ab32a8 Move impl_array_newtype to internal_macros (Tobin C. Harding)

Pull request description:

  Use `to_vec` and deprecate `to_bytes`, the opposite of what we did in #2585.

  For functions that return a `Vec` by first allocating use function name `to_vec`. This explicitly excludes:

  - Functions that return an array (`CompressedPublicKey::to_bytes`)
  - Functions that consume self and return a `Vec` without allocating (`ScriptBuf::into_bytes`)

  See #3025 for discussion and consensus.

  Close: #3025

ACKs for top commit:
  apoelstra:
    ACK a51768af3f3d4c8e138e1ded250800810bedc903; successfully ran local tests

Tree-SHA512: ee932c13ad2e09c2b76a7833b23c859df175aa307f56e673921f3ae8b5d865518c6f999749e3b627594457b3ca33301b777177ada3520cf006acc0f14e5dacf8
2024-11-01 00:55:15 +00:00
..
address Run the formatter 2024-10-30 11:30:24 +11:00
blockdata Merge rust-bitcoin/rust-bitcoin#3544: Favour `to_vec` over `to_bytes` 2024-11-01 00:55:15 +00:00
consensus Bump hex-conservative to 0.3.0 2024-10-31 03:36:22 +00:00
crypto key: Deprecate to_bytes 2024-11-01 07:10:41 +11:00
merkle_tree Explicitly re-export stuff from crates down the stack 2024-10-27 06:45:58 +11:00
network Elide more lifetimes 2024-10-28 15:22:13 +11:00
p2p Elide more lifetimes 2024-10-28 15:22:13 +11:00
psbt script: deprecate to_bytes 2024-11-01 07:09:53 +11:00
taproot Merge rust-bitcoin/rust-bitcoin#3518: Automated nightly rustfmt (2024-10-27) 2024-10-28 21:34:59 +00:00
bip32.rs Move impl_array_newtype to internal_macros 2024-10-31 14:15:41 +11:00
bip152.rs Move impl_array_newtype to internal_macros 2024-10-31 14:15:41 +11:00
bip158.rs Replace VarInt type with ReadExt and WriteExt functions 2024-09-25 06:56:09 +10:00
consensus_validation.rs Introduce Transaction extension traits 2024-10-30 12:28:52 +11:00
hash_types.rs Unify deprecated note field format 2024-10-15 15:16:01 +01:00
internal_macros.rs Merge rust-bitcoin/rust-bitcoin#3544: Favour `to_vec` over `to_bytes` 2024-11-01 00:55:15 +00:00
lib.rs Use doc(notable_trait) 2024-10-31 13:33:28 +11:00
policy.rs Remove usage of blockdata from paths 2024-06-20 12:00:22 +10:00
pow.rs Elide more lifetimes 2024-10-28 15:22:13 +11:00
serde_utils.rs Elide more lifetimes 2024-10-28 15:22:13 +11:00
sign_message.rs refactor: compute recid in a single line 2024-10-18 16:39:50 +09:00