Hey 👋
Most Engine struct parameters that accept strings in their parameters mainly use String, which requires unneccessary heap allocations in scenarios where a simple &'static str will do. For instance, Engine::add_policy's example may be written to the following assuming that impl AsRef<str> is used instead of String; note how to_string() has been removed:
let mut engine = Engine::new();
let package = engine.add_policy(
"test.rego",
r#"
package test
allow = input.user == "root"
"#)?;
assert_eq!(package, "data.test");
I am happy to contribute this change myself if you guys want to go ahead with the suggestion.