Rename _expr to expr (#1264)

This commit is contained in:
Rohan Sharma 2021-06-02 00:50:12 +05:30 committed by GitHub
parent 4986ea2e59
commit 358b80f62e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,13 +79,13 @@ pub fn quote_args<DB: DatabaseExt>(
use ::sqlx::ty_match::{WrapSameExt as _, MatchBorrowExt as _};
// evaluate the expression only once in case it contains moves
let _expr = ::sqlx::ty_match::dupe_value(#name);
let expr = ::sqlx::ty_match::dupe_value(#name);
// 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 `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);
// if `expr` is `&str`, convert `String` to `&str`
let (mut _ty_check, match_borrow) = ::sqlx::ty_match::MatchBorrow::new(ty_check, &expr);
_ty_check = match_borrow.match_borrow();