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

feat: impl Map get_key_value #829

Merged
merged 1 commit into from
Feb 5, 2025
Merged

feat: impl Map get_key_value #829

merged 1 commit into from
Feb 5, 2025

Conversation

tisonkun
Copy link
Contributor

@tisonkun tisonkun commented Feb 5, 2025

@epage

This is brought from serde_json's impl.

It helps when you want to tell the compiler that the key (&String) has the same lifetime to &self, while using the input key: &Q doesn't have this bound.

I found this while implementing cratesland/spath#20

@tisonkun
Copy link
Contributor Author

tisonkun commented Feb 5, 2025

Also cc @dtolnay if you have spare time to double check that such cherry-pick is OK for toml's fork.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 13159993320

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 67.948%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/toml/src/map.rs 0 1 0.0%
Totals Coverage Status
Change from base Build 13083323838: -0.01%
Covered Lines: 3746
Relevant Lines: 5513

💛 - Coveralls

@epage epage merged commit fbc77ec into toml-rs:main Feb 5, 2025
14 of 15 checks passed
@tisonkun tisonkun deleted the map-get-kv branch February 5, 2025 15:16
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.

3 participants