@@ -108,18 +108,16 @@ fn parse_call(cx: &LateContext<'_>, span: Span, func: &Expr<'_>, args: &[Expr<'_
108
108
109
109
let arg_kind = & args[ 0 ] . kind ;
110
110
if let ExprKind :: Path ( qpath) = & func. kind {
111
- if let QPath :: TypeRelative ( _, _) = qpath {
112
- // String::from(...) or String::try_from(...)
113
- if let QPath :: TypeRelative ( ty, path_seg) = qpath
114
- && [ sym:: from, sym:: try_from] . contains ( & path_seg. ident . name )
115
- && let TyKind :: Path ( qpath) = & ty. kind
116
- && let QPath :: Resolved ( _, path) = qpath
117
- && let [ path_seg] = path. segments
118
- && path_seg. ident . name == sym:: String
119
- && is_expr_kind_empty_str ( arg_kind)
120
- {
121
- warn_then_suggest ( cx, span) ;
122
- }
111
+ // String::from(...) or String::try_from(...)
112
+ if let QPath :: TypeRelative ( ty, path_seg) = qpath
113
+ && [ sym:: from, sym:: try_from] . contains ( & path_seg. ident . name )
114
+ && let TyKind :: Path ( qpath) = & ty. kind
115
+ && let QPath :: Resolved ( _, path) = qpath
116
+ && let [ path_seg] = path. segments
117
+ && path_seg. ident . name == sym:: String
118
+ && is_expr_kind_empty_str ( arg_kind)
119
+ {
120
+ warn_then_suggest ( cx, span) ;
123
121
} else if let QPath :: Resolved ( _, path) = qpath {
124
122
// From::from(...) or TryFrom::try_from(...)
125
123
if let [ path_seg1, path_seg2] = path. segments
0 commit comments