Fix clippy warnings (#1965)

This commit is contained in:
Tobie Morgan Hitchcock 2023-05-10 12:58:04 -04:00 committed by GitHub
parent 3140e06ad2
commit 86483e087a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -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)
});

View file

@ -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());
}

View file

@ -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,
{