Annotate the DB type for Decode in Decode for String

This commit is contained in:
Ryan Leckey 2020-03-11 01:55:06 -07:00
parent 038a6f2d30
commit e701aef9af
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}

View File

@ -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)
}
}