Skip to content

Commit

Permalink
Fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
brianreicher committed Oct 10, 2023
1 parent 53ebcaa commit 5e51add
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ingestion/src/mongo_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ impl MongoDriver {
}

let collection: mongodb::Collection<Document> =
self.client.as_ref().unwrap().database(&self.db_name).collection(collection_name);
self.client.as_ref()
.unwrap()
.database(&self.db_name)
.collection(collection_name);

let cursor: mongodb::Cursor<Document> = collection.find(Document::new(), None).await?;
let mut result: Vec<Document> = Vec::new();
Expand Down
5 changes: 4 additions & 1 deletion tokenizer/src/oai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ impl OpenAIClient {

pub async fn tokenize_collection(&self, collection: &str) -> std::io::Result<>{
let result Vec<Document> = self.mongo_client.get_all_documents(self.collection);
let col: mongodb::Collection<Document>= self.mongo_model.client.as_ref().unwrap().database(&self.mongo_model.db_name).collection(collection);
let col: mongodb::Collection<Document>= self.mongo_model.client.as_ref()
.unwrap()
.database(&self.mongo_model.db_name)
.collection(collection);

while let Some(result) = cursor.next().await {
match result {
Expand Down

0 comments on commit 5e51add

Please sign in to comment.