diff --git a/crates/torii/grpc/src/client.rs b/crates/torii/grpc/src/client.rs index e5ce49f9c1..0707d0415c 100644 --- a/crates/torii/grpc/src/client.rs +++ b/crates/torii/grpc/src/client.rs @@ -130,15 +130,14 @@ impl WorldClient { ) -> Result<(), Error> { let clauses = clauses.into_iter().map(|c| c.into()).collect(); - Ok(self - .inner + self.inner .update_entities_subscription(UpdateEntitiesSubscriptionRequest { subscription_id, clauses, }) .await .map_err(Error::Grpc) - .map(|res| res.into_inner())?) + .map(|res| res.into_inner()) } /// Subscribe to event messages of a World. @@ -169,15 +168,14 @@ impl WorldClient { clauses: Vec, ) -> Result<(), Error> { let clauses = clauses.into_iter().map(|c| c.into()).collect(); - Ok(self - .inner + self.inner .update_event_messages_subscription(UpdateEntitiesSubscriptionRequest { subscription_id, clauses, }) .await .map_err(Error::Grpc) - .map(|res| res.into_inner())?) + .map(|res| res.into_inner()) } /// Subscribe to the events of a World. diff --git a/crates/torii/grpc/src/server/subscriptions/entity.rs b/crates/torii/grpc/src/server/subscriptions/entity.rs index 47200ff050..41bcddf8df 100644 --- a/crates/torii/grpc/src/server/subscriptions/entity.rs +++ b/crates/torii/grpc/src/server/subscriptions/entity.rs @@ -1,4 +1,4 @@ -use std::collections::{BTreeMap, HashMap, HashSet}; +use std::collections::HashMap; use std::future::Future; use std::pin::Pin; use std::str::FromStr; @@ -123,7 +123,7 @@ impl Service { // matches the key pattern of the subscriber. if !sub.clauses.iter().any(|clause| match clause { EntityKeysClause::HashedKeys(hashed_keys) => { - return hashed_keys.is_empty() || hashed_keys.contains(&hashed); + hashed_keys.is_empty() || hashed_keys.contains(&hashed) } EntityKeysClause::Keys(clause) => { // if we have a model clause, then we need to check that the entity diff --git a/crates/torii/grpc/src/server/subscriptions/event_message.rs b/crates/torii/grpc/src/server/subscriptions/event_message.rs index d4ea340c80..5cef6bba32 100644 --- a/crates/torii/grpc/src/server/subscriptions/event_message.rs +++ b/crates/torii/grpc/src/server/subscriptions/event_message.rs @@ -1,4 +1,4 @@ -use std::collections::{BTreeMap, HashMap, HashSet}; +use std::collections::HashMap; use std::future::Future; use std::pin::Pin; use std::str::FromStr; @@ -10,7 +10,7 @@ use futures_util::StreamExt; use rand::Rng; use sqlx::{Pool, Sqlite}; use starknet::core::types::Felt; -use tokio::sync::mpsc::{channel, Receiver, Sender}; +use tokio::sync::mpsc::{channel, Receiver}; use tokio::sync::RwLock; use torii_core::cache::ModelCache; use torii_core::error::{Error, ParseError}; @@ -117,7 +117,7 @@ impl Service { // matches the key pattern of the subscriber. if !sub.clauses.iter().any(|clause| match clause { EntityKeysClause::HashedKeys(hashed_keys) => { - return hashed_keys.is_empty() || hashed_keys.contains(&hashed); + hashed_keys.is_empty() || hashed_keys.contains(&hashed) } EntityKeysClause::Keys(clause) => { // if we have a model clause, then we need to check that the entity