帖子
分享您的知识。
skywinder271
Jan 23, 2025
专家问答
How to resolve mutable borrow error in Rust function?
I'm encountering an error while trying to get a value from an object in two places within the same Rust function. The error states it's still being mutably borrowed. How do I resolve this?
- Move CLI
3
2
分享
评论
答案
2Xavier.eth260
Jan 23 2025, 15:56b1_obj
要解决此问题,请确保第一个可变引用 (b2_obj
) 超出范围,然后尝试使用第二个可变引用 () 再次借用该对象.
3
最佳答案
评论
你知道答案吗?
请登录并分享。
Move is an executable bytecode language used to implement custom transactions and smart contracts.
148帖子231答案