How to convert Option to Option<&T> in the most idiomatic way in Rust?

前端 未结 0 2017
花落未央
花落未央 2021-02-01 10:39

Suppose I have a value x that has the type of Option, how do I convert it to Option<&T> ?
I tried using map

相关标签:
回答
  • 消灭零回复
提交回复
热议问题