Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Oct 17, 2024
1 parent 494307e commit cf370b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 9 additions & 3 deletions crates/torii/client/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ use starknet::providers::jsonrpc::HttpTransport;
use starknet::providers::JsonRpcClient;
use tokio::sync::RwLock as AsyncRwLock;
use torii_grpc::client::{EventUpdateStreaming, IndexerUpdateStreaming};
use torii_grpc::proto::world::{RetrieveEntitiesResponse, RetrieveEventsResponse, SubscribeEntityResponse};
use torii_grpc::proto::world::{
RetrieveEntitiesResponse, RetrieveEventsResponse, SubscribeEntityResponse,
};
use torii_grpc::types::schema::Entity;
use torii_grpc::types::{EntityKeysClause, Event, EventQuery, KeysClause, Query};
use torii_relay::client::EventLoop;
Expand Down Expand Up @@ -130,7 +132,9 @@ impl Client {
Ok(EntityUpdateStreaming(stream.map_ok(Box::new(move |res| {
res.entity.map_or(
(res.subscription_id, Entity { hashed_keys: Felt::ZERO, models: vec![] }),
|entity| (res.subscription_id, entity.map(&models).expect("must able to serialize"))
|entity| {
(res.subscription_id, entity.map(&models).expect("must able to serialize"))
},
)
}))))
}
Expand Down Expand Up @@ -158,7 +162,9 @@ impl Client {
Ok(EntityUpdateStreaming(stream.map_ok(Box::new(move |res| {
res.entity.map_or(
(res.subscription_id, Entity { hashed_keys: Felt::ZERO, models: vec![] }),
|entity| (res.subscription_id, entity.map(&models).expect("must able to serialize"))
|entity| {
(res.subscription_id, entity.map(&models).expect("must able to serialize"))
},
)
}))))
}
Expand Down
3 changes: 1 addition & 2 deletions crates/torii/grpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ use crate::proto::world::{
RetrieveEventsResponse, SubscribeEntitiesRequest, SubscribeEntityResponse,
SubscribeEventsRequest, SubscribeEventsResponse, SubscribeIndexerRequest,
SubscribeIndexerResponse, SubscribeModelsRequest, SubscribeModelsResponse,
UpdateEntitiesSubscriptionRequest, WorldMetadataRequest
UpdateEntitiesSubscriptionRequest, WorldMetadataRequest,
};

use crate::types::schema::SchemaError;
use crate::types::{
EntityKeysClause, Event, EventQuery, IndexerUpdate, KeysClause, ModelKeysClause, Query,
Expand Down

0 comments on commit cf370b6

Please sign in to comment.