Fix clippy warnings (#1965)
This commit is contained in:
parent
3140e06ad2
commit
86483e087a
3 changed files with 3 additions and 3 deletions
|
@ -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<u8> = Lazy::new(|| {
|
||||
pub static MAX_COMPUTATION_DEPTH: Lazy<u8> = Lazy::new(|| {
|
||||
option_env!("SURREAL_MAX_COMPUTATION_DEPTH").and_then(|s| s.parse::<u8>().ok()).unwrap_or(120)
|
||||
});
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -216,7 +216,7 @@ pub(crate) mod no_nul_bytes {
|
|||
};
|
||||
use std::fmt;
|
||||
|
||||
pub(crate) fn serialize<S>(s: &String, serializer: S) -> Result<S::Ok, S::Error>
|
||||
pub(crate) fn serialize<S>(s: &str, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where
|
||||
S: Serializer,
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue