Use parse() instead of deprecated from_str()

from_str was deprecated in rust: https://github.com/rust-lang/rust/commit/4908017d59da8694b9ceaf743baf1163c1e19086