diff --git a/crates/torii/grpc/src/server/mod.rs b/crates/torii/grpc/src/server/mod.rs index b3580fa2f4..30054029c1 100644 --- a/crates/torii/grpc/src/server/mod.rs +++ b/crates/torii/grpc/src/server/mod.rs @@ -257,7 +257,8 @@ impl DojoWorld { "# ); // total count of rows without limit and offset - let total_count: u32 = sqlx::query_scalar(&count_query).fetch_optional(&self.pool).await?.unwrap_or(0); + let total_count: u32 = + sqlx::query_scalar(&count_query).fetch_optional(&self.pool).await?.unwrap_or(0); if total_count == 0 { return Ok((Vec::new(), 0)); @@ -375,8 +376,11 @@ impl DojoWorld { } ); - let total_count = - sqlx::query_scalar(&count_query).bind(&keys_pattern).fetch_optional(&self.pool).await?.unwrap_or(0); + let total_count = sqlx::query_scalar(&count_query) + .bind(&keys_pattern) + .fetch_optional(&self.pool) + .await? + .unwrap_or(0); if total_count == 0 { return Ok((Vec::new(), 0)); @@ -521,8 +525,9 @@ impl DojoWorld { "#, compute_selector_from_names(namespace, model) ); - - let models_result: Option<(String,)> = sqlx::query_as(&models_query).fetch_optional(&self.pool).await?; + + let models_result: Option<(String,)> = + sqlx::query_as(&models_query).fetch_optional(&self.pool).await?; // we return an empty array of entities if the table is empty if models_result.is_none() { return Ok((Vec::new(), 0));