Skip to content

Commit

Permalink
refactor: move statements according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
FGoessler committed Jan 8, 2025
1 parent 5e3670a commit 4917ea7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,10 @@ async fn find_ids(
builder.query = Some(filter);
};

let mut builder = builder.with_model_projection(id_field)?;

builder.limit = limit;

let builder = builder.with_model_projection(id_field)?;
let query = builder.build()?;
let docs = query.execute(collection, session).await?;
let ids = docs.into_iter().map(|mut doc| doc.remove("_id").unwrap()).collect();
Expand Down

0 comments on commit 4917ea7

Please sign in to comment.