Function rslint_core::util::simple_bool_coerce [−][src]
pub fn simple_bool_coerce(condition: Expr) -> Option<bool>
Expand description
Attempt to check if a simple expression is always truthy or always falsey.
For example, true
, false
, and foo = true
, this does not consider math ops like 0 + 0
.