ide_db::syntax_helpers::node_ext

Function 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).