Replies: 1 comment
-
That sounds like this bug: #3737 For now, pulling the id binding into a separate line is the best zero cost solution |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
In my code I want to be able to do:
In debug mode this works. I think that is because "key" is not used in debug mode.
In release mode I get the error that the item in the "item: " line was used after being moved in the "key:" line.
I can fix this by changing the second item to
item.clone()
. But this seems silly to clone the entire object, when I just need to copy the id value.Is there a better solution?
So far everything I have tried has had problems, or is excessively verbose.
For example, this will work, but now I need 2 additional indent levels. Plus I get a warning in debug mode that id is defined but not used.
Beta Was this translation helpful? Give feedback.
All reactions