mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 15:25:32 +00:00
Annotate the DB type for Decode in Decode for String
This commit is contained in:
parent
038a6f2d30
commit
e701aef9af
@ -61,6 +61,6 @@ impl<'de> Decode<'de, MySql> for &'de str {
|
||||
|
||||
impl<'de> Decode<'de, MySql> for String {
|
||||
fn decode(buf: Option<MySqlValue<'de>>) -> crate::Result<Self> {
|
||||
<&'de str>::decode(buf).map(ToOwned::to_owned)
|
||||
<&'de str as Decode<MySql>>::decode(buf).map(ToOwned::to_owned)
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ impl Encode<Postgres> for String {
|
||||
|
||||
impl<'de> Decode<'de, Postgres> for String {
|
||||
fn decode(buf: Option<PgValue<'de>>) -> crate::Result<Self> {
|
||||
<&'de str>::decode(buf).map(ToOwned::to_owned)
|
||||
<&'de str as Decode<Postgres>>::decode(buf).map(ToOwned::to_owned)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user