sybila / biodivine-lib-bdd

A small library for BDD manipulation in Rust. Part of the BioDivine toolset.
MIT License
20 stars 4 forks source link

Use `AsRef` to accept both `Bdd` and `&Bdd` in core methods #15

Closed daemontus closed 3 years ago

daemontus commented 3 years ago

In many methods for Bdd manipulation, we often expect a reference to another Bdd (like the and function). This makes the API slightly weird to use because we have to put & everywhere. However, there is a useful built in trait AsRef that we can implement in Bdd that can be used for this easily.

daemontus commented 3 years ago

This will not work :/