Skip to main content

create_expr_or_spread

Function create_expr_or_spread 

Source
pub fn create_expr_or_spread(expr: Expr) -> ExprOrSpread
Expand description

Wraps an arbitrary expression in ExprOrSpread with no spread. This is the generic counterpart to the typed expr_or_spread_*_factory helpers and eliminates the common boilerplate ExprOrSpread { spread: None, expr: Box::new(e) }.