There used to be a fn std::num::cast
that would cast between integer types and return an Option
(returning None
if the cast was invalid). Where did that functionality go?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Similarily to previous question, that functionality moved to num crate. More precisely, It's in num::traits::cast.