I am unable to compile code that converts a type from an integer to a string. I'm running an example from the Rust for Rubyists tutorial which has various type conversions such as:
"Fizz".to_str()
and num.to_str()
(where num
is an integer).
I think the majority (if not all) of these to_str()
function calls have been deprecated. What is the current way to convert an integer to a string?
The errors I'm getting are:
error: type `&'static str` does not implement any method in scope named `to_str`
error: type `int` does not implement any method in scope named `to_str`
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…