Release on April 26th, 2020
-
Correctly calculate complexity for sequences of logical boolean operators.
Multiple boolean operators now only increase the complexity when they change. For example:
let expr: Expr = parse_quote! { x && y && z }; assert_eq!(expr.complexity(), 1); let expr: Expr = parse_quote! { x && y || z }; assert_eq!(expr.complexity(), 2);
Released on April 25th, 2020
-
Properly take into account nesting level.
Previously this was not implemented correctly and multiple nested structures would not accurately contribute to the complexity.
-
Implement
Complexityforsyn::Expr.This means you can calculate the complexity of arbitrary expressions:
let expr: Expr = parse_quote! { if something { do_something() } }; assert_eq!(expr.complexity(), 1);
Released on April 20th, 2020
- First release