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

as_table_like_ mut? #110

Closed
epage opened this issue Jul 2, 2021 · 2 comments
Closed

as_table_like_ mut? #110

epage opened this issue Jul 2, 2021 · 2 comments

Comments

@epage
Copy link
Member

epage commented Jul 2, 2021

I'm messing with Cargo.toml files and can't guarantee what fields will exist, so I use a lot of get_mut. I also can't guarantee what style of table is being used, but there isn't a as_table_like_mut.

Any concerns with me adding this?

@ordian
Copy link
Member

ordian commented Jul 2, 2021

My main concern would be type-safety. I'd be possible to set a Table as a child of an InlineTable.
I just realized that #106 added get_mut to the TableLike trait. It slipped during review (and apart from that was technically a breaking change), but is useless right now.

I'd be possible to set a Table as a child of an InlineTable.

Hmm, actually it's possible already with inline_table.get_mut(key).

@epage
Copy link
Member Author

epage commented Jul 2, 2021

Ah, good point. I'm trying to find every reference to a dependency and update its version. I'll give some things a try.

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

No branches or pull requests

2 participants