mirror of
https://github.com/gorules/zen.git
synced 2026-10-04 16:02:18 +00:00
feat: add bigjs to function node; (#77)
* feat: add bigjs to function node; * fix test * fix tests * fix fmt
This commit is contained in:
@@ -44,11 +44,11 @@ impl PyZenEngine {
|
||||
#[new]
|
||||
pub fn new(maybe_options: Option<&PyDict>) -> PyResult<Self> {
|
||||
let Some(options) = maybe_options else {
|
||||
return Ok(Default::default())
|
||||
return Ok(Default::default());
|
||||
};
|
||||
|
||||
let Some(loader_any) = options.get_item("loader") else {
|
||||
return Ok(Default::default())
|
||||
return Ok(Default::default());
|
||||
};
|
||||
|
||||
let loader = Python::with_gil(|py| loader_any.to_object(py));
|
||||
|
||||
@@ -17,7 +17,7 @@ impl From<PyObject> for PyDecisionLoader {
|
||||
impl PyDecisionLoader {
|
||||
fn load_element(&self, key: &str) -> Result<Arc<DecisionContent>, anyhow::Error> {
|
||||
let Some(object) = &self.0 else {
|
||||
return Err(anyhow!("Loader is not defined"))
|
||||
return Err(anyhow!("Loader is not defined"));
|
||||
};
|
||||
|
||||
let content = Python::with_gil(|py| {
|
||||
|
||||
Reference in New Issue
Block a user