Skip to content

Commit eb5b015

Browse files
committed
add comment in implementation
1 parent 86d11ef commit eb5b015

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sqlx-core/src/decode.rs

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ macro_rules! impl_decode_for_smartpointer {
111111
Vec<u8>: Decode<'r, DB>,
112112
{
113113
fn decode(value: <DB as Database>::ValueRef<'r>) -> Result<Self, BoxDynError> {
114+
// The `Postgres` implementation requires this to be decoded as an owned value because
115+
// bytes can be sent in text format.
114116
let ref_str = <Vec<u8> as Decode<DB>>::decode(value)?;
115117
Ok(ref_str.into())
116118
}

0 commit comments

Comments
 (0)