Function ide_db::syntax_helpers::node_ext::single_let
source ยท pub fn single_let(expr: Expr) -> Option<LetExpr>
Expand description
Returns the let
only if there is exactly one (that is, let pat = expr
or ((let pat = expr))
, but not let pat = expr && expr
or non_let_expr
).