Skip to main content

simplify_expression_preserving_structure

Function simplify_expression_preserving_structure 

Source
pub fn simplify_expression_preserving_structure(
    expr: &LicenseExpression,
) -> LicenseExpression
Expand description

Canonicalize a license expression while preserving non-identical operands.

This still flattens boolean chains, removes exact duplicates, and sorts operands deterministically, but it deliberately avoids absorption such as MIT AND (Apache-2.0 OR MIT) -> MIT.