Skip to content

Commit

Permalink
Rename _expr to expr (#1264)
Browse files Browse the repository at this point in the history
  • Loading branch information
RhnSharma authored Jun 1, 2021
1 parent 4986ea2 commit 358b80f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sqlx-macros/src/query/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 358b80f

Please sign in to comment.