diff options
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/main.rs | 6 |
2 files changed, 3 insertions, 5 deletions
@@ -1,6 +1,6 @@ [package] name = "embeddings-sort" -version = "0.3.0" +version = "0.3.1" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs index 0318210..2e63dd8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,3 @@ -#![feature(iterator_try_collect)] - use anyhow::{anyhow, Result}; use clap::Parser; use sha2::{Digest, Sha512_256}; @@ -111,7 +109,7 @@ where let tree = typed_sled::Tree::<[u8; 32], E::Embedding>::open(&db, E::NAME); // find cached embeddings - let mut embeds: Vec<_> = args + let mut embeds = args .images .iter() .map(|path| { @@ -119,7 +117,7 @@ where let r: Result<Option<E::Embedding>> = tree.get(&h).map_err(|e| e.into()); r }) - .try_collect()?; + .collect::<Result<Vec<_>>>()?; // find indices of missing embeddings let missing_embeds_indices: Vec<_> = embeds |