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

fix: allow deserializing BDAddr from non-borrowed strings #408

Merged
merged 1 commit into from
Nov 17, 2024

Conversation

icewind1991
Copy link
Contributor

ran into this while trying to use DBAddr as a value in a toml map.

Trying to deserialize a toml like

"00:11:22:33:44:55" = "Test"

into a HashMap<BDAddr, String>

results in the error

Error: TOML parse error at line 5, column 1
  |
5 | "00:11:22:33:44:55" = "Test"
  | ^^^^^^^^^^^^^^^^^^^
invalid type: string "00:11:22:33:44:55", expected A colon seperated Bluetooth address, like `00:11:22:33:44:55`

By making the Visitor also handle owned and ephemeral strings the deserialization works as expected.

@qwandor qwandor changed the base branch from master to dev November 17, 2024 21:32
@qwandor qwandor merged commit 70ee65c into deviceplug:dev Nov 17, 2024
5 checks passed
@icewind1991 icewind1991 deleted the bdaddr-deserialize-string branch November 18, 2024 21:22
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