fix: get MatchBorrow type check working for references 3 deep

This commit is contained in:
Ryan Leckey
2020-07-26 23:07:12 -07:00
parent fe04a1b612
commit d06de149a0
3 changed files with 54 additions and 20 deletions

View File

@@ -83,6 +83,7 @@ pub fn quote_args<DB: DatabaseExt>(
// if `_expr` is `Option<T>`, get `Option<$ty>`, otherwise `$ty`
let ty_check = sqlx::ty_match::WrapSame::<#param_ty, _>::new(&_expr).wrap_same();
// if `_expr` is `&str`, convert `String` to `&str`
let (mut _ty_check, match_borrow) = sqlx::ty_match::MatchBorrow::new(ty_check, &_expr);