Change example to use FromStr

std::str::from_str() is deprecated