Skip to content

Rename Script::empty to Script::new#1925

Merged
apoelstra merged 1 commit intorust-bitcoin:masterfrom
tcharding:06-26-script-new
Jul 18, 2023
Merged

Rename Script::empty to Script::new#1925
apoelstra merged 1 commit intorust-bitcoin:masterfrom
tcharding:06-26-script-new

Conversation

@tcharding
Copy link
Copy Markdown
Member

The empty constructor is mis-named for the following reasons:

  • Non-uniform with ScriptBuf::new
  • Non-standard with respect to stdlib which uses Path::new and PathBuf::new (on which we based the Scritp/ScriptBuf)

Rename the function to new, put it at the top of the impl block while we are at it.

@yancyribbens
Copy link
Copy Markdown
Contributor

SGTM

Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 36d072eadc0e7efb19c4bc53613e3ffe1528045e

The `empty` constructor is mis-named for the following reasons:

- Non-uniform with `ScriptBuf::new`
- Non-standard with respect to stdlib which uses `Path::new` and
  `PathBuf::new` (on which we based the `Scritp`/`ScriptBuf`)

Rename the function to `new`, put it at the top of the impl block while
we are at it.
@tcharding
Copy link
Copy Markdown
Member Author

Rebased on master (to pick up #1927). No other changes.

Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9787ba6

Copy link
Copy Markdown
Collaborator

@RCasatta RCasatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9787ba6

@apoelstra apoelstra merged commit 9a34f0c into rust-bitcoin:master Jul 18, 2023
apoelstra added a commit that referenced this pull request Aug 1, 2023
55be538 policy: Add refactor carve out (Tobin C. Harding)

Pull request description:

  I have managed to burn out or bore our reviewers/maintainers. Getting two acks is becoming increasingly difficult. I've pestered everyone to the limit that I feel socially comfortable doing so, and as such, am requesting a carve out to the 2-ACK before merge rule.

  The primary justification is that I feel we should have a bit more of BDFL and a bit less total consensus if we are to push forwards.

  ### Example PRs where this change would apply

  - #1925
  - #1854
  - #1862

ACKs for top commit:
  elichai:
    I agree this makes sense for refactors ACK 55be538
  apoelstra:
    ACK 55be538
  sanket1729:
    ACK 55be538. Same reasons as apoelstra. And this is only for re-factors that are not adding any new features.
  RCasatta:
    ACK 55be538

Tree-SHA512: a5e206252015f49245ed282a3be7a35760d16f94dc6e60f31edf589a41ef642eba52a3bd7d1375b6033f3cf0128f47beee4f03e59cad151c64eedd71ac98baac
@tcharding tcharding deleted the 06-26-script-new branch May 22, 2024 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants