Skip to content

Commit

Permalink
Update a docstring for remove_empty_expression
Browse files Browse the repository at this point in the history
  • Loading branch information
YehorBoiar committed Oct 17, 2024
1 parent dc7f98b commit 74e857f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions crates/conjure_core/src/rules/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,16 @@ fn remove_nothings(expr: &Expr, _: &Model) -> ApplicationResult {
}
}

/// Remove empty expressions:
/// ```text
/// or([]) ~> false
/// X([]) ~> Nothing
/// ```
/// This rule simplifies expressions where the operator is applied to an empty set of sub-expressions.
///
/// For example:
/// - `or([])` simplifies to `false` since no disjunction exists.
///
/// **Applicable examples:**
/// ```text
/// or([]) ~> false
/// X([]) ~> Nothing
/// ```
#[register_rule(("Base", 8800))]
fn remove_empty_expression(expr: &Expr, _: &Model) -> ApplicationResult {
use Expr::*;
Expand Down

0 comments on commit 74e857f

Please sign in to comment.