refactor: remove extraneous Some

This commit is contained in:
Anna 2021-12-27 19:35:34 -05:00
parent 88bfa7796b
commit fd7ab070f1
1 changed files with 2 additions and 2 deletions

View File

@ -126,9 +126,9 @@ pub async fn get_stats_seven_days(state: &State) -> Result<Statistics> {
async fn get_stats_internal(state: &State, docs: impl IntoIterator<Item = Document>) -> Result<Statistics> {
let mut cursor = state
.collection()
.aggregate(docs, Some(AggregateOptions::builder()
.aggregate(docs, AggregateOptions::builder()
.allow_disk_use(true)
.build()))
.build())
.await?;
let doc = cursor.try_next().await?;
let doc = doc.ok_or_else(|| anyhow::anyhow!("missing document"))?;