Fix warnings in Wasm (#4778)
This commit is contained in:
parent
3d505697de
commit
9af0082376
5 changed files with 8 additions and 2 deletions
|
@ -396,6 +396,7 @@ impl Iterator {
|
|||
}
|
||||
|
||||
/// Check if the iteration can be limited per iterator
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
fn check_set_start_limit(&mut self, ctx: &Context, stm: &Statement<'_>) -> bool {
|
||||
// If there are groups we can't
|
||||
if stm.group().is_some() {
|
||||
|
@ -421,6 +422,7 @@ impl Iterator {
|
|||
false
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
fn compute_start_limit(&mut self, ctx: &Context, stm: &Statement<'_>) {
|
||||
if self.check_set_start_limit(ctx, stm) {
|
||||
if let Some(l) = self.limit {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![cfg(not(target_arch = "wasm32"))]
|
||||
|
||||
use crate::ctx::Context;
|
||||
use crate::dbs::Options;
|
||||
use crate::err::Error;
|
||||
|
|
|
@ -168,6 +168,7 @@ impl QueryPlanner {
|
|||
&self.fallbacks
|
||||
}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub(crate) fn is_order(&self, irf: &IteratorRef) -> bool {
|
||||
self.orders.contains(irf)
|
||||
}
|
||||
|
|
|
@ -283,6 +283,7 @@ impl InfoStatement {
|
|||
false => Value::from(res.to_string()),
|
||||
})
|
||||
}
|
||||
#[allow(unused_variables)]
|
||||
InfoStatement::Index(index, table, _structured) => {
|
||||
// Allowed to run?
|
||||
opt.is_allowed(Action::View, ResourceKind::Actor, &Base::Db)?;
|
||||
|
|
|
@ -92,7 +92,7 @@ async fn router_handle_request(
|
|||
response,
|
||||
}: Route,
|
||||
state: &mut RouterState,
|
||||
endpoint: &Endpoint,
|
||||
_endpoint: &Endpoint,
|
||||
) -> HandleResult {
|
||||
let RequestData {
|
||||
id,
|
||||
|
@ -209,7 +209,7 @@ async fn router_handle_request(
|
|||
async fn router_handle_response(
|
||||
response: Message,
|
||||
state: &mut RouterState,
|
||||
endpoint: &Endpoint,
|
||||
_endpoint: &Endpoint,
|
||||
) -> HandleResult {
|
||||
match Response::try_from(&response) {
|
||||
Ok(option) => {
|
||||
|
|
Loading…
Reference in a new issue