diff --git a/sqlx-core/src/mysql/types/bigdecimal.rs b/sqlx-core/src/mysql/types/bigdecimal.rs index 4be6c324..c5461f20 100644 --- a/sqlx-core/src/mysql/types/bigdecimal.rs +++ b/sqlx-core/src/mysql/types/bigdecimal.rs @@ -151,24 +151,24 @@ impl Decode<'_, MySql> for BigDecimal { fn test_encode_decimal() { let v = BigDecimal::new(BigInt::from(-105), 2); let mut buf: Vec = vec![]; - v.encode(&mut buf); + >::encode(&v, &mut buf); assert_eq!(buf, vec![0x05, 0x2D, 0x31, 0x2E, 0x30, 0x35]); let v = BigDecimal::new(BigInt::from(-105), -3); let mut buf: Vec = vec![]; - v.encode(&mut buf); + >::encode(&v, &mut buf); assert_eq!(buf, vec![0x07, 0x2D, 0x31, 0x30, 0x35, 0x30, 0x30, 0x30]); let v = BigDecimal::new(BigInt::from(105), 5); let mut buf: Vec = vec![]; - v.encode(&mut buf); + >::encode(&v, &mut buf); assert_eq!(buf, vec![0x07, 0x30, 0x2E, 0x30, 0x30, 0x31, 0x30, 0x35]); } #[test] fn test_decode_decimal() { let buf: Vec = vec![0x05, 0x2D, 0x31, 0x2E, 0x30, 0x35]; - let v = BigDecimal::decode(MySqlValue::binary( + let v = >::decode(MySqlValue::binary( MySqlTypeInfo::new(TypeId::NEWDECIMAL), buf.as_slice(), )) @@ -176,7 +176,7 @@ fn test_decode_decimal() { assert_eq!(v.to_string(), "-1.05"); let buf: Vec = vec![0x04, 0x30, 0x2E, 0x30, 0x35]; - let v = BigDecimal::decode(MySqlValue::binary( + let v = >::decode(MySqlValue::binary( MySqlTypeInfo::new(TypeId::NEWDECIMAL), buf.as_slice(), )) @@ -184,7 +184,7 @@ fn test_decode_decimal() { assert_eq!(v.to_string(), "0.05"); let buf: Vec = vec![0x06, 0x2D, 0x39, 0x30, 0x30, 0x30, 0x30]; - let v = BigDecimal::decode(MySqlValue::binary( + let v = >::decode(MySqlValue::binary( MySqlTypeInfo::new(TypeId::NEWDECIMAL), buf.as_slice(), ))