rust-bitcoin-unsafe-fast/primitives
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
..
contrib Implement Arbitrary for Transaction 2024-09-16 22:02:46 -05:00
src Merge rust-bitcoin/rust-bitcoin#3544: Favour `to_vec` over `to_bytes` 2024-11-01 00:55:15 +00:00
CHANGELOG.md Introduce empty primitives crate 2024-07-03 05:22:39 +10:00
Cargo.toml Bump hex-conservative to 0.3.0 2024-10-31 03:36:22 +00:00
README.md Move Witness to primitives 2024-10-18 14:02:03 +11:00

README.md

Rust Bitcoin - primitive types.

This crate provides primitive data types that are used throughout the rust-bitcoin ecosystem.

Semver compliance

Functions marked as unstable (e.g. foo__unstable) are not guaranteed to uphold semver compliance. They are primarily provided to support rust-bitcoin.

Minimum Supported Rust Version (MSRV)

This library should always compile with any combination of features on Rust 1.63.0.

Licensing

The code in this project is licensed under the Creative Commons CC0 1.0 Universal license. We use the SPDX license list and SPDX IDs.