parse_bytes is deprecated

TBH I'm not sure if this is the most efficient method, but it matches the conversions at https://github.com/rust-lang/rust/commit/138b76b83a067284f25e1f8971600aaf49206816#diff-fcdbb6413438d3b568fe96fd242d8fc9R617