Merge rust-bitcoin/rust-bitcoin#3344: Deprecate `OutPoint::new` constructor

e064686397 Deprecate OutPoint::new constructor (Tobin C. Harding)

Pull request description:

  The `OutPoint` type has two public fields, providing a `new` constructor that just sets these two fields adds no value.

  Done after discussion in #3340 as part of `primitives` work.

ACKs for top commit:
  Kixunil:
    ACK e064686397
  apoelstra:
    ACK e064686397 successfully ran local tests

Tree-SHA512: d80cac85093946b3678883f4e3ad7fd2052d858dbd3fab4127916b0eb6153999d30827c84ccf8c6e4412fbc3842bd127a2e4d3ca0248d2307d0bca467a2555ce
This commit is contained in:
merge-script 2024-09-12 17:43:48 +00:00
commit eacdd69688
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 1 additions and 0 deletions

View File

@ -122,6 +122,7 @@ impl OutPoint {
/// Creates a new [`OutPoint`]. /// Creates a new [`OutPoint`].
#[inline] #[inline]
#[deprecated(since = "TBD", note = "use struct initialization syntax instead")]
pub const fn new(txid: Txid, vout: u32) -> OutPoint { OutPoint { txid, vout } } pub const fn new(txid: Txid, vout: u32) -> OutPoint { OutPoint { txid, vout } }
/// Creates a "null" `OutPoint`. /// Creates a "null" `OutPoint`.