We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Decode
1 parent 86d11ef commit bf09881Copy full SHA for bf09881
sqlx-core/src/decode.rs
@@ -111,8 +111,10 @@ macro_rules! impl_decode_for_smartpointer {
111
Vec<u8>: Decode<'r, DB>,
112
{
113
fn decode(value: <DB as Database>::ValueRef<'r>) -> Result<Self, BoxDynError> {
114
- let ref_str = <Vec<u8> as Decode<DB>>::decode(value)?;
115
- Ok(ref_str.into())
+ // The `Postgres` implementation requires this to be decoded as an owned value because
+ // bytes can be sent in text format.
116
+ let bytes = <Vec<u8> as Decode<DB>>::decode(value)?;
117
+ Ok(bytes.into())
118
}
119
120
};
0 commit comments