Skip to content

Allow SecretKey to be deserialized from an owned string#268

Closed
thomaseizinger wants to merge 1 commit into
rust-bitcoin:masterfrom
thomaseizinger:deser-secret-key
Closed

Allow SecretKey to be deserialized from an owned string#268
thomaseizinger wants to merge 1 commit into
rust-bitcoin:masterfrom
thomaseizinger:deser-secret-key

Conversation

@thomaseizinger

@thomaseizinger thomaseizinger commented Jan 5, 2021

Copy link
Copy Markdown
Contributor

Deserializing directly into a borrowed string only covers the edge
case in which one passes a borrowed string to the deserializer.

If we are given an owned version, the deserialization fails with:

invalid type: string "foobar", expected a borrowed string'

Deserializing directly into a borrowed string only covers the edge
case in which one passes a borrowed string to the deserializer.

If we are given an owned version, the deserialization fails with:

invalid type: string "foobar", expected a borrowed string'

@tcharding tcharding left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For what its worth, LGTM. Oh, do we need this still with #218?

@thomaseizinger

Copy link
Copy Markdown
Contributor Author

For what its worth, LGTM. Oh, do we need this still with #218?

We don't! #218 is a much more elegant solution to this problem!

Closing in favor of #218.

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