Should I use Option<()> instead of bool, and is there overhead?

前端 未结 0 1537
攒了一身酷
攒了一身酷 2020-12-06 01:30

My function might fail, but it doesn\'t return result, the empty type in rust is () as such takes up 0 bytes, if Option is defined like that



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