| 1 | use std::any::type_name; |
| 2 | |
| 3 | use crate::any::type_info::AnyTypeInfo; |
| 4 | use crate::any::Any; |
| 5 | use crate::error::BoxDynError; |
| 6 | use crate::type_info::TypeInfo; |
| 7 | use crate::types::Type; |
| 8 | |
| 9 | pub(super) fn mismatched_types<T: Type<Any>>(ty: &AnyTypeInfo) -> BoxDynError { |
| 10 | format!( |
| 11 | "mismatched types; Rust type `{}` is not compatible with SQL type `{}`", |
| 12 | type_name::<T>(), |
| 13 | ty.name() |
| 14 | ) |
| 15 | .into() |
| 16 | } |