Skip to content

Conversation

@tejasbadadare
Copy link
Contributor

The current deserializer for the Channel type fails to work with string values loaded from toml by config -- the config crate is trying to deserialize an owned String but the deserializer expects a borrowed &str, causing this error:

invalid type: string "fixed_rate@50ms", expected a borrowed string for key lazer.subscriptions[0]channel" 

Fixed by making the deserializer accept both String and &str (Serde will coerce a &str into a String).
Also threw in a minor clippy fix (dev_dependencies -> dev-dependencies).

@vercel
Copy link

vercel bot commented Feb 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 11:03pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 11:03pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 4, 2025 11:03pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Feb 4, 2025 11:03pm
entropy-debugger ⬜️ Ignored (Inspect) Feb 4, 2025 11:03pm
insights ⬜️ Ignored (Inspect) Feb 4, 2025 11:03pm

tracing = "0.1"
url = "2.4"

[dev_dependencies]
Copy link
Contributor

Choose a reason for hiding this comment

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

what is changed here?

Copy link
Contributor

Choose a reason for hiding this comment

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

was it not working at all? or both works?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

both work, but this format is deprecated:

`dev_dependencies` is deprecated in favor of `dev-dependencies` and will not work in the 2024 edition

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it was causing clippy pre-commit step to fail

@tejasbadadare tejasbadadare merged commit 218d780 into main Feb 4, 2025
10 checks passed
@tejasbadadare tejasbadadare deleted the tb/lazer/channel-deser-string branch February 4, 2025 23:41
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