utilize carrier
This commit is contained in:
parent
2fa7351c1e
commit
2a486528ee
1 changed files with 3 additions and 9 deletions
|
@ -121,15 +121,9 @@ fn build_suggestion<'a, 'tcx>(
|
|||
receiver_expr: &hir::Expr,
|
||||
cast_lhs_expr: &hir::Expr,
|
||||
) -> Option<String> {
|
||||
match (
|
||||
utils::snippet_opt(cx, receiver_expr.span),
|
||||
utils::snippet_opt(cx, cast_lhs_expr.span)
|
||||
) {
|
||||
(Some(receiver), Some(cast_lhs)) => {
|
||||
Some(format!("{}.{}({})", receiver, method.suggestion(), cast_lhs))
|
||||
},
|
||||
_ => None,
|
||||
}
|
||||
let receiver = utils::snippet_opt(cx, receiver_expr.span)?;
|
||||
let cast_lhs = utils::snippet_opt(cx, cast_lhs_expr.span)?;
|
||||
Some(format!("{}.{}({})", receiver, method.suggestion(), cast_lhs))
|
||||
}
|
||||
|
||||
enum Method {
|
||||
|
|
Loading…
Add table
Reference in a new issue