From 783fed38d76ddf00f14a87c5806367bdf7268cf1 Mon Sep 17 00:00:00 2001 From: tzdanows Date: Sun, 8 Oct 2023 21:01:00 -0500 Subject: [PATCH] formatting --- tweets-backend/src/service/tweet.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tweets-backend/src/service/tweet.rs b/tweets-backend/src/service/tweet.rs index ea0bfe5..b4e7557 100644 --- a/tweets-backend/src/service/tweet.rs +++ b/tweets-backend/src/service/tweet.rs @@ -2,8 +2,8 @@ use std::time::Instant; use mongodb::bson; use mongodb::bson::doc; -use tonic::{Request, Response, Status}; use tonic::codegen::tokio_stream::StreamExt; +use tonic::{Request, Response, Status}; use tracing::info; use uuid::Uuid; @@ -68,7 +68,8 @@ impl TweetService for TweetServiceImpl { info!("Batch-get Tweets"); let tweet_id = _request.into_inner().tweet_ids; - let mut cursor = self.client + let mut cursor = self + .client .database(MongoDB::Tweets.name()) .collection(MongoCollection::Tweets.name()) .find( @@ -135,7 +136,8 @@ impl TweetService for TweetServiceImpl { info!("Find Most Recent Tweets By User"); let user_id = _request.into_inner().user_id; - let mut cursor = self.client + let mut cursor = self + .client .database(MongoDB::Tweets.name()) .collection(MongoCollection::Tweets.name()) .find( @@ -161,8 +163,8 @@ impl TweetService for TweetServiceImpl { // Build and return the response Ok(Response::new(BatchTweetResponse { tweets })) - } } +} #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] struct TweetsDao {