std::as_const as a way of differentiating between mutable and non-mutable parameters

前端 未结 0 1185
半阙折子戏
半阙折子戏 2020-12-24 00:24

One of the nicer features of Rust is explicitly showing whether parameters are mutable, non-mutable, or moved from the caller\'s site:

foobar(&mut foo, &a         


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