diff --git a/lib/src/cnf/mod.rs b/lib/src/cnf/mod.rs index c61f5596..7589e314 100644 --- a/lib/src/cnf/mod.rs +++ b/lib/src/cnf/mod.rs @@ -8,7 +8,7 @@ pub const MAX_CONCURRENT_TASKS: usize = 64; /// Specifies how deep various forms of computation will go before the query fails. /// /// For reference, use ~15 per MiB of stack in release mode. -pub const MAX_COMPUTATION_DEPTH: Lazy = Lazy::new(|| { +pub static MAX_COMPUTATION_DEPTH: Lazy = Lazy::new(|| { option_env!("SURREAL_MAX_COMPUTATION_DEPTH").and_then(|s| s.parse::().ok()).unwrap_or(120) }); diff --git a/lib/src/fnc/script/from.rs b/lib/src/fnc/script/from.rs index cf168a36..71e925d3 100644 --- a/lib/src/fnc/script/from.rs +++ b/lib/src/fnc/script/from.rs @@ -62,7 +62,7 @@ impl<'js> FromJs<'js> for Value { let v: &classes::record::record::Record = v.as_ref(); check_nul(&v.value.tb)?; if let Id::String(s) = &v.value.id { - check_nul(&s)?; + check_nul(s)?; } return Ok(v.value.clone().into()); } diff --git a/lib/src/sql/strand.rs b/lib/src/sql/strand.rs index edd8a1d8..602a7015 100644 --- a/lib/src/sql/strand.rs +++ b/lib/src/sql/strand.rs @@ -216,7 +216,7 @@ pub(crate) mod no_nul_bytes { }; use std::fmt; - pub(crate) fn serialize(s: &String, serializer: S) -> Result + pub(crate) fn serialize(s: &str, serializer: S) -> Result where S: Serializer, {