Skip to content

How to change nested elements (cannot borrow data in dereference...) #761

Closed Answered by manio
manio asked this question in Q&A
Discussion options

You must be logged in to vote

I searched for DerefMut in issues and encounter this: #54
Thanks to that issue I've added as_mut() to have a call like this:

x.services[0].media_sink_service.as_mut().unwrap().video_configs[0].set_viewing_distance(80);

And it seems this was it! :)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by manio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant