Skip to content

units: Remove InputString from the public API#3905

Merged
apoelstra merged 2 commits intorust-bitcoin:masterfrom
tcharding:01-15-int-function
Jan 15, 2025
Merged

units: Remove InputString from the public API#3905
apoelstra merged 2 commits intorust-bitcoin:masterfrom
tcharding:01-15-int-function

Conversation

@tcharding
Copy link
Copy Markdown
Member

Currently InputString is in the public API of units because of the trait bound on parse::int(). We can just do the monomorphisisation manually to remove it.

This patch renames int to have three different names, one for &str one for String, and one for Box<str> e.g., units::parse::int_from_str.

Close #3708

Currently `InputString` is in the public API of `units` because of the
trait bound on `parse::int()`. We can just do the monomorphisisation
manually to remove it.

This patch renames `int` to have three different names, one for `&str`
one for `String`, and one for `Box<str>`.
@github-actions github-actions bot added C-bitcoin PRs modifying the bitcoin crate C-units PRs modifying the units crate C-primitives labels Jan 14, 2025
@tcharding
Copy link
Copy Markdown
Member Author

This is #3848 re-opened because I accidentally closed it.

@github-actions
Copy link
Copy Markdown

🚨 API BREAKING CHANGE DETECTED

To see the changes click details on "Check semver breaks / PR Semver - stable toolchain" job then expand "Run semver checker script" and scroll to the end of the section.

@github-actions github-actions bot added the API break This PR requires a version bump for the next release label Jan 14, 2025
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 5628626; successfully ran local tests; this looks great!

@apoelstra apoelstra merged commit 87d9389 into rust-bitcoin:master Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API break This PR requires a version bump for the next release C-bitcoin PRs modifying the bitcoin crate C-primitives C-units PRs modifying the units crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

units: Remove internals::InputString from the public API

2 participants