Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Address::from_str #1342

Merged
merged 1 commit into from
Sep 18, 2024
Merged

Add Address::from_str #1342

merged 1 commit into from
Sep 18, 2024

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Sep 18, 2024

What

Add Address::from_str.

Why

For convenient conversions directly from a &str to an Address in tests:

Address::from_str(&env, "C...")

It is possible to do the same with:

Address::from_string(String::from_str(&env, "C..."))

But that is so verbose, the nested fn calls often get rustfmted to span multiple lines.

@leighmcculloch leighmcculloch marked this pull request as ready for review September 18, 2024 13:04
@leighmcculloch leighmcculloch added this pull request to the merge queue Sep 18, 2024
Merged via the queue into main with commit f314be9 Sep 18, 2024
16 checks passed
@leighmcculloch leighmcculloch deleted the address-from-str branch September 18, 2024 16:56
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.

2 participants