mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-29 21:00:54 +00:00
This function can panic due to slicing out of bounds when the server responds without the `\x` prefix. With this commit we instead error and also ensure that the prefix is what we expect instead of blindly removing it. Not directly related to the panic, we replace as_str() with as_bytes() because there is no reason to perform a utf8 validity check when hex::decode already checks that the content is valid.